<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pull(handle, enumerate=False):
 """Pulls next message for handle. Args: handle: A :class:`.stream.Handle` or GroupHandle. enumerate (bool):
 boolean to indicate whether a tuple ``(idx, msg)`` should be returned, not unlike Python's enumerate(). Returns: A :class:`Pull` task to be yielded. Marv will send the corresponding message as soon as it is available. For groups this message will be a handle to a member of the group. Members of groups are either streams or groups. Examples: Pulling (enumerated) message from stream:: msg = yield marv.pull(stream) idx, msg = yield marv.pull(stream, enumerate=True) Pulling stream from group and message from stream:: stream = yield marv.pull(group) # a group of streams msg = yield marv.pull(stream) """

    assert isinstance(handle, Handle), handle
    return Pull(handle, enumerate)