code: def __iter__(self):
      batch_st = self._batch_size * self._rank
      batch_end = self._batch_size * (self._rank + 1)
      for batch in self.__batch_iter():
          batch_size = batch["inputs"].shape[0]
          if batch_size <= batch_st:
              yield None
          else:
              ret: CPMBeeBatch = {
                  kw: val[batch_st:batch_end]  # type: ignore
                  for kw, val in batch.items()
                  if kw
                  not in [
                      "task_names",
                      "raw_data",
                      "ext_ids",
                      "ext_sub",
                  ]
              }  # type: ignore
              ret["task_names"] = batch["task_names"]
              ret["raw_data"] = batch["raw_data"]
              ret["ext_ids"] = batch["ext_ids"]
              ret["ext_sub"] = batch["ext_sub"]
              yield ret
  
file_path: DeepKE/example/llm/CPM-Bee/src/cpm_live/training_tasks/bee/finetune.py
imports: from ...tokenizers import CPMBeeTokenizer
  from .pretrain import _MixedDatasetBatchPacker, _MixedDatasetConfig, CPMBeeBatch
  from ...dataset import SimpleDataset
  import bmtrain
label_desc: Use image node_id 3 for calling the FinetuneDataset obj's underlying member method code with example usage: obj.__iter__() without return types