code: def split_dataset(dataset, num_workers, worker_id, num_threads):
      worker_splits = split_index(0, len(dataset), num_workers)
      thread_splits = split_index(
          worker_splits[worker_id][0],
          worker_splits[worker_id][1],
          num_threads,
      )
      return worker_splits, thread_splits
  
file_path: deepspeed/deepspeed/runtime/data_pipeline/data_sampling/utils.py
imports: import math
  import numpy
  from deepspeed.utils import logger
  from .indexed_dataset import MMapIndexedDatasetBuilder
label_desc: Use image node_id 3 for calling a global function with example usage: split_dataset(dataset, num_workers, worker_id, num_threads) and returns: worker_splits,  thread_splits