code: 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,
      ):
          
  
          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
docs: 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".
  
              >>> with async.connect() as conn:
              >>>     async for event in conn.iter("my-stream"):
              >>>         print(event)
  
              Print every event from the stream "my-stream" in reverse order
  
              >>> with async.connect() as conn:
              >>>     async for event in conn.iter("my-stream", direction=StreamDirection.Backward):
              >>>         print(event)
  
              Skip the first 10 events of the stream
  
              >>> with async.connect() as conn:
              >>>     async for event in conn.iter("my-stream", from_event=11):
              >>>         print(event)