code: def _getdata_by_idx(data, idx):
      """Shuffle the data."""
      shuffle_data = []
  
      for k, v in data:
          if isinstance(v, h5py.Dataset) if h5py else False:
              shuffle_data.append((k, v))
          elif isinstance(v, CSRNDArray):
              shuffle_data.append(
                  (k, sparse_array(v.asscipy()[idx], v.context))
              )
          else:
              shuffle_data.append(
                  (k, array(v.asnumpy()[idx], v.context))
              )
  
      return shuffle_data
  
file_path: mxnet/python/mxnet/io/utils.py
imports: from collections import OrderedDict
  import numpy
  from ..ndarray.sparse import CSRNDArray
  from ..ndarray.sparse import array
  from ..ndarray import NDArray
  from ..ndarray import array
label_desc: Use image node_id 3 for calling a global function with example usage: _getdata_by_idx(data, idx) and returns: shuffle_data