def METHOD_NAME():
    def wrapper_maker(channel):
        def wrapper(f, args, kwargs):
            channel.append(True)
            __ddgen = f(*args, **kwargs)
            __ddgensend = __ddgen.send
            try:
                value = next(__ddgen)
                channel.append(value)
            except StopIteration:
                return
            while True:
                try:
                    tosend = yield value
                except GeneratorExit:
                    channel.append("GeneratorExit")
                    __ddgen.close()
                    raise GeneratorExit()
                except:  # noqa
                    channel.append(sys.exc_info()[0])
                    value = __ddgen.throw(*sys.exc_info())
                    channel.append(value)
                else:
                    try:
                        value = __ddgensend(tosend)
                        channel.append(value)
                    except StopIteration:
                        return
        return wrapper
    channel = []
    def g():
        while True:
            try:
                yield 0
            except ValueError:
                yield 1
    wrap(g, wrapper_maker(channel))
    inspect.isgeneratorfunction(g)
    gen = g()
    inspect.isgenerator(gen)
    for _ in range(10):
        assert next(gen) == 0
        assert gen.throw(ValueError) == 1
    gen.close()
    assert channel == [True] + [0, ValueError, 1] * 10 + ["GeneratorExit"]