When https://github.com/mlr-org/paradox/issues/268 is fixed there ought to be a dedicated function that does that.