convert a method of the class RunMEtUncertainties to a function