<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _my_partial(func, *args, **kwargs):
 """ 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. """

    newobj = partial(func, *args, **kwargs)
    # monkey patch
    newobj.from_string = FloatWithUnit.from_string
    return newobj