def __init__(self, func, reset_flag):
    '''
    Initializes an instance.

    See instance variables for parameter descriptions.
    '''       
    self.func = func
    self.gen = None
    self.reset_flag = reset_flag

    Initializes an instance.

    See instance variables for parameter descriptions.
    
recipes/Python/392154_Generator_methods/recipe-392154.py