code: def _sort_key(x):
      # sorts x which could correspond to either (sample["input"], sample["target"]),
      # or sample["input"]
      if isinstance(x, tuple):
          return x[0].tolist() + x[1].tolist()
      else:
          return x.tolist()
  
file_path: ClassyVision/test/dataset_image_path_dataset_test.py
imports: import os
  import shutil
  import tempfile
  import unittest
  import torch
  from classy_vision.dataset import build_dataset, ClassyDataset
  from classy_vision.dataset.image_path_dataset import ImagePathDataset
  from torchvision import transforms
label_desc: Use image node_id 1 for calling a global function with example usage: _sort_key(x) and returns: unknown, x