code: def shuffle_dataset(dataset, np_rng):
      size = len(dataset)
      dtype_ = np.uint32
      if size >= (np.iinfo(np.uint32).max - 1):
          dtype_ = np.int64
      shuffle_idx = np.arange(start=0, stop=size, step=1, dtype=dtype_)
      np_rng.shuffle(shuffle_idx)
      return Subset(dataset, shuffle_idx.tolist())
  
file_path: deepspeedexamples/applications/DeepSpeed-VisualChat/utils/data/utils.py
imports: import torch
  from torch.utils.data import Subset
  from torch.nn.utils.rnn import pad_sequence
  import numpy
  import shutil
  from torch.utils.data.dataloader import default_collate
  import utils.data.DST
label_desc: Use image node_id 2 for calling a global function with example usage: shuffle_dataset(dataset, np_rng) and returns: Subset