def METHOD_NAME(self):
    def f(n):
        i = 0
        yield i
        i += 1
        j = i
        yield i
        yield j
        j *= 100
        i += j
        yield j
        yield i
        yield n + i
    a = []
    for i in f(10): # i to conflict with body
        j = 999
        a.append(i)
    self.assertEqual(a, [0, 1, 1, 100, 101, 111])
    def f(n):
        i = 0
        while i < n:
            yield i
            yield i * 10
            i += 1
    a = []
    for i in f(10):
        a.append(i)
    self.assertEqual(a, [0, 0, 1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60, 7, 70, 8, 80, 9, 90])
    def f(n):
        i = 0
        while i < n:
            yield i
            i = 100
            yield i
            i += 1
    a = []
    for i in f(50):
        a.append(i)
    self.assertEqual(a, [0, 100])
    def f():
        y = 0
        while y == 0:
            y += 1
            yield y
    a = []
    for i in f():
        a.append(i)
    self.assertEqual(a, [1])
    def yrange(n):
        for i in range(n):
            yield i
    self.assertEqual([0, 1, 2, 3, 4],list(yrange(5)))
    def yrange(n):
        for i in range(n):
            yield i
    def zrange(n):
        for y in yrange(n):
            yield y
    self.assertEqual(list(zrange(5)), [0, 1, 2, 3, 4])
    def f(n):
        yield 1
        a, b = n, n + 1
        yield 2
        yield a
        yield b
    a = 9999
    b = 9999
    z = []
    for i in f(20):
        z.append(i)
    self.assertEqual(z, [1,2,20,21])
    def f():
        for i in 1,2,3,4,5:
            if i == 4: return
            yield i
    self.assertEqual([1, 2, 3], list(f()))
    def foo(value = None):
        for i in [-1,0,1,2,3,4]:
            if i < 0:
                continue
            elif i == 0:
                yield 0
            elif i == 1:
                yield 1
                yield value
                yield 2
            else:
                yield i
    self.assertEqual(list(foo()), [0, 1, None, 2, 2, 3, 4])
    def f():
        if 1 == 2:
            yield -1
        elif 1 == 1:
            yield 3
        else:
            yield -1
    self.assertEqual(list(f()),[3])
    class GeneratorClass:
        test = "hi"
        def __init__(self):
            pass
        def generator(self):
            for i in range(10):
                yield i
    gen = GeneratorClass()
    a = []
    for g in gen.generator():
        a.append(g)
    self.assertEqual(a, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])