docstr: Given an iterator that yields lines, iterate over it & yield every event encountered
docstr_tok: ["Given","an","iterator","that","yields","lines",",","iterate","over","it","&","yield","every","event","encountered"]
code: def iter(self, iterator: Iterator[str]) -> Iterator[ServerSentEvent]:
      """Given an iterator that yields lines, iterate over it & yield every event encountered"""
      for line in iterator:
          line = line.rstrip("\n")
          sse = self.decode(line)
          if sse is not None:
              yield sse
  
imports: from __future__ import annotations
  import json
  from types import TracebackType
  from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast
  from typing_extensions import Self, override
  import httpx
  from ._utils import is_mapping
  from ._exceptions import APIError
label_desc: Use image node_id 2 for calling the SSEDecoder obj's underlying member method code with example usage: obj.iter(iterator) without return types