class_docstr: Stream-51 Pytorch Dataset
docstr: data_list
  for train: [class_id, clip_num, video_num, frame_num, bbox, file_loc]
  for test: [class_id, bbox, file_loc]
docstr_tok: ["data_list","for","train",":","[","class_id",",","clip_num",",","video_num",",","frame_num",",","bbox",",","file_loc","]","for","test",":","[","class_id",",","bbox",",","file_loc","]"]
code: def make_dataset(data_list, ordering="class_instance", seed=666):
      """
      data_list
      for train: [class_id, clip_num, video_num, frame_num, bbox, file_loc]
      for test: [class_id, bbox, file_loc]
      """
      if (
          not ordering or len(data_list[0]) == 3
      ):  # cannot order the test set
          return data_list
      if ordering not in [
          "iid",
          "class_iid",
          "instance",
          "class_instance",
      ]:
          raise ValueError(
              'dataset ordering must be one of: "iid", "class_iid", '
              '"instance", or "class_instance"'
          )
      if ordering == "iid":
          # shuffle all data
          random.seed(seed)
          random.shuffle(data_list)
          return data_list
      elif ordering == "instance":
          return Stream51._instance_ordering(data_list, seed)
      elif "class" in ordering:
          return Stream51._class_ordering(data_list, ordering, seed)
  
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 7 for calling the Stream51 obj's underlying member method code with example usage: obj.make_dataset(data_list, ordering, seed) and returns: data_list, data_list, Stream51, Stream51