code: def __iter__(self) -> Iterator:
      batch_x, batch_y = [], []
      for x, y in self.corpus.sample():
          batch_x.append(x)
          batch_y.append(y)
          if len(batch_x) == self.batch_size:
              x_tensor = self.encoder_processor.transform(
                  batch_x,
                  seq_length=self.encoder_seq_length,
                  segment=self.encoder_segment,
              )
              y_tensor = self.decoder_processor.transform(
                  batch_y,
                  seq_length=self.decoder_seq_length,
                  segment=self.encoder_segment,
              )
              yield x_tensor, y_tensor
              batch_x, batch_y = [], []
  
imports: from abc import ABC
  from typing import Iterable, Iterator, TYPE_CHECKING
  from typing import List, Any, Tuple
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling the Seq2SeqDataSet obj's underlying member method code with example usage: obj.__iter__() without return types