<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generator_to_list(fn):
 """This decorator is for flat_list function. It converts returned generator to list. """

    def wrapper(*args, **kw):
        return list(fn(*args, **kw))
    return wrapper