class_docstr: Define an interface to make the IterableDatasets for text2img data chainable
code: def _sample_generator(self, start, end):
      for idx in range(start, end):
          file_name = self.file_list[idx]
          txt_name = self.txt_list[idx]
          f_ = open(txt_name, "r")
          txt_ = f_.read()
          f_.close()
          image = cv2.imdecode(
              np.fromfile(file_name, dtype=np.uint8), 1
          )
          image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
          image = torch.from_numpy(image) / 255
          yield {"txt": txt_, "image": image}
  
file_path: colossalai/examples/images/diffusion/ldm/data/base.py
imports: import os
  import cv2
  import numpy
  import torch
  from torch.utils.data import IterableDataset
label_desc: Use image node_id 4 for calling the Txt2ImgIterableBaseDataset obj's underlying member method code with example usage: obj._sample_generator(start, end) without return types