class_docstr: Stream-51 Pytorch Dataset
code: def _class_ordering(data_list, class_type, seed):
      # organize data by class
      new_data_list = []
      for class_id in range(data_list[-1][0] + 1):
          class_data_list = [x for x in data_list if x[0] == class_id]
          if class_type == "class_iid":
              # shuffle all class data
              random.seed(seed)
              random.shuffle(class_data_list)
          else:
              # shuffle clips within class
              class_data_list = Stream51._instance_ordering(
                  class_data_list, seed
              )
          new_data_list.append(class_data_list)
      # shuffle classes
      random.seed(seed)
      random.shuffle(new_data_list)
      # reorganize by class
      data_list = []
      for v in new_data_list:
          for x in v:
              data_list.append(x)
      return data_list
  
imports: import os
  import shutil
  import json
  import random
  from pathlib import Path
  from typing import Any, List, Optional, Sequence, Tuple, TypeVar, Union
  from torchvision.datasets.folder import default_loader
  from zipfile import ZipFile
  from torchvision.transforms import ToTensor
  from avalanche.benchmarks.datasets import DownloadableDataset, default_dataset_location
  from avalanche.benchmarks.datasets.stream51 import stream51_data
label_desc: Use image node_id 6 for calling the Stream51 obj's underlying member method code with example usage: obj._class_ordering(data_list, class_type, seed) and returns: data_list