code: def batch_query_event_records(
              self,
              batch_size: int,
              filters: List[Tuple[str, Any]] = None,
              logical_and: bool = True,
      ) -> Iterator[List[EventRecord]]:
          
          limit = batch_size
          offset = 0
          result_length = 1
  
          while result_length != 0:
              result = self._get_event_records(
                  limit=limit,
                  offset=offset,
                  filters=filters,
                  logical_and=logical_and,
              )
              result_length = len(result)
              offset += result_length
              yield result
docs: Batch query event records with a given batch size and an optional filter
  
          This is a generator function returning each batch to the caller to work with.