<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def animation(frame_function: types.FrameFunction) -> types.Animation: """Turn a FrameFunction into an Animation. Args: frame_function: A function that returns a FrameGenerator. Returns: an Animation decorator function. """

    animation_ = core.Animation(frame_function)

    @functools.wraps(frame_function)
    def wrapper(*args, **kwargs):
        return animation_(*args, **kwargs)

    return wrapper