code: def _shuffle(data, idx):
      
      shuffle_data = []
  
      for idx_k, idx_v in data:
          shuffle_data.append((idx_k, mx.ndarray.array(idx_v.asnumpy()[idx], idx_v.context)))
  
      return shuffle_data
docs: Shuffle the data.