parameters: (get_io_helper_func)
return_statement: return decorator_factory
docstring: A decorator that takes one argument.  The argument should be an instance
      of the helper class returned by new_helper().  This decorator wraps a method
      so that is may perform asynchronous IO using the helper instance.  The
      method being wrapped should take a keyword argument 'io_helper' which will
      be set to the helper instance passed in.
docstring_summary: A decorator that takes one argument.  The argument should be an instance
      of the helper class returned by new_helper().  This decorator wraps a method
      so that is may perform asynchronous IO using the helper instance.  The
      method being wrapped should take a keyword argument 'io_helper' which will
      be set to the helper instance passed in.
docstring_tokens: A decorator that takes one argument . The argument should be an instance of the helper class returned by new_helper () . This decorator wraps a method so that is may perform asynchronous IO using the helper instance . The method being wrapped should take a keyword argument io_helper which will be set to the helper instance passed in .
function: def wrap(get_io_helper_func):
      """A decorator that takes one argument.  The argument should be an instance
      of the helper class returned by new_helper().  This decorator wraps a method
      so that is may perform asynchronous IO using the helper instance.  The
      method being wrapped should take a keyword argument 'io_helper' which will
      be set to the helper instance passed in."""
      def decorator_factory(func):
          def func_wrapper(*args, **kwargs):
              if not "io_helper" in kwargs:
                  kwargs["io_helper"] = get_io_helper_func()
              helper = kwargs["io_helper"]
              helper._generator = func(*args, **kwargs)
              helper._next()
          func_wrapper.__doc__ = func.__doc__
          func_wrapper.__name__ = func.__name__
          return func_wrapper
  
      return decorator_factory
function_tokens: def wrap ( get_io_helper_func ) : def decorator_factory ( func ) : def func_wrapper ( * args , * * kwargs ) : if not "io_helper" in kwargs : kwargs [ "io_helper" ] = get_io_helper_func ( ) helper = kwargs [ "io_helper" ] helper . _generator = func ( * args , * * kwargs ) helper . _next ( ) func_wrapper . __doc__ = func . __doc__ func_wrapper . __name__ = func . __name__ return func_wrapper return decorator_factory