code: def _my_partial(func, *args, **kwargs):
      
      newobj = partial(func, *args, **kwargs)
      # monkey patch
      newobj.from_string = FloatWithUnit.from_string
      return newobj
docs: Partial returns a partial object and therefore we cannot inherit class
      methods defined in FloatWithUnit. This function calls partial and patches
      the new class before returning.