def reusable(func):
sig = signature(func)<EOL>origin = func<EOL>while hasattr(origin, '<STR_LIT>'):<EOL><INDENT>origin = origin.__wrapped__<EOL><DEDENT>return type(<EOL>origin.__name__,<EOL>(ReusableGenerator, ),<EOL>dict([<EOL>('<STR_LIT>',       origin.__doc__),<EOL>('<STR_LIT>',    origin.__module__),<EOL>('<STR_LIT>', sig),<EOL>('<STR_LIT>',   staticmethod(func)),<EOL>] + [<EOL>(name, property(compose(itemgetter(name),<EOL>attrgetter('<STR_LIT>'))))<EOL>for name in sig.parameters<EOL>] + ([<EOL>('<STR_LIT>',  origin.__qualname__),<EOL>] if sys.version_info > (<NUM_LIT:3>, ) else [])))<EOL>
Create a reusable class from a generator function

    Parameters
    ----------
    func: GeneratorCallable[T_yield, T_send, T_return]
        the function to wrap

    Note
    ----
    * the callable must have an inspectable signature
    * If bound to a class, the new reusable generator is callable as a method.
      To opt out of this, add a :func:`staticmethod` decorator above
      this decorator.