def METHOD_NAME(x, *args, **kwds):  # pylint: disable=C0111
    if isinstance(x, Quantity):
        return getattr(x, func.__name__)(*args, **kwds)
    else:
        # no need to wrap anything
        return func(x, *args, **kwds)