original_docstring: Have a function return a Quantity with given unit
docstring: Have a function return a Quantity with given unit
docstring_tokens: Have a function return a Quantity with given unit
code: def use_unit(unit):
      """Have a function return a Quantity with given unit"""
      use_unit.ureg = pint.UnitRegistry()
  
      def decorator_use_unit(func):
          @functools.wraps(func)
          def wrapper_use_unit(*args, **kwargs):
              value = func(*args, **kwargs)
              return value * use_unit.ureg(unit)
          return wrapper_use_unit
      return decorator_use_unit
code_tokens: def use_unit ( unit ) : use_unit . ureg = pint . UnitRegistry ( ) def decorator_use_unit ( func ) : @ functools . wraps ( func ) def wrapper_use_unit ( * args , ** kwargs ) : value = func ( * args , ** kwargs ) return value * use_unit . ureg ( unit ) return wrapper_use_unit return decorator_use_unit
short_docstring: Have a function return a Quantity with given unit
short_docstring_tokens: Have a function return a Quantity with given unit
comment: """Have a function return a Quantity with given unit"""