code: def __iter__(self):
      while self.consumed_samples <= self.total_samples:
          if len(self.batch) == 0:
              self.get_next_global_batch()
          current_batch = self.batch[
              : self.micro_batch_times_data_parallel_size
          ]
          self.batch = self.batch[
              self.micro_batch_times_data_parallel_size :
          ]
          if len(
              current_batch
          ) == self.micro_batch_times_data_parallel_size or (
              len(current_batch) > 0 and not self.drop_last
          ):
              start_idx, end_idx = self.get_start_end_idx()
              yield current_batch[start_idx:end_idx]
              self.consumed_samples += len(current_batch)
              current_batch = []
  
imports: import torch
  import os
  import numpy
  import deepspeed.comm
  from deepspeed.utils import logger
  from deepspeed.accelerator import get_accelerator
  from ..constants import *
  from ..curriculum_scheduler import CurriculumScheduler
  from .indexed_dataset import MMapIndexedDataset
  from .utils import create_mmap_dataset_builder, close_mmap_dataset_builder, find_fit_int_dtype
label_desc: Use image node_id 12 for calling the DeepSpeedDataSampler obj's underlying member method code with example usage: obj.__iter__() without return types