<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def iter( self, stream: str, direction: msg.StreamDirection = msg.StreamDirection.Forward, from_event: int = None, batch_size: int = 100, resolve_links: bool = True, require_master: bool = False, correlation_id: uuid.UUID = None, ):
 """ Read through a stream of events until the end and then stop. Args: stream: The name of the stream to read. direction: Controls whether to read forward or backward through the stream. Defaults to StreamDirection.Forward from_event: The sequence number of the first event to read from the stream. Reads from the appropriate end of the stream if unset. batch_size: The maximum number of events to read at a time. resolve_links (optional):
 True if eventstore should automatically resolve Link Events, otherwise False. required_master (optional):
 True if this command must be sent direct to the master node, otherwise False. correlation_id (optional):
 A unique identifer for this command. Examples: Print every event from the stream "my-stream". Print every event from the stream "my-stream" in reverse order Skip the first 10 events of the stream """


        correlation_id = correlation_id or uuid.uuid4()
        cmd = convo.IterStreamEvents(
            stream,
            from_event,
            batch_size,
            resolve_links,
            direction=direction,
            credentials=self.credential,
        )
        result = await self.dispatcher.start_conversation(cmd)
        iterator = await result
        async for event in iterator:
            yield event