code: def as_ufloat(roorealvar):
      
      if isinstance(roorealvar, (U.AffineScalarFunc, U.Variable)):
          return roorealvar
      return U.ufloat((roorealvar.getVal(), roorealvar.getError()))
docs: Cast a `RooRealVar` to an `uncertainties.ufloat`