code: def register_dataset(name, bypass_checks=False):
      """Registers a :class:`ClassyDataset` subclass.
  
      This decorator allows Classy Vision to instantiate a subclass of
      ClassyDataset from a configuration file, even if the class itself is not
      part of the Classy Vision framework. To use it, apply this decorator to a
      ClassyDataset subclass like this:
  
      .. code-block:: python
  
        @register_dataset("my_dataset")
        class MyDataset(ClassyDataset):
            ...
  
      To instantiate a dataset from a configuration file, see
      :func:`build_dataset`."""
  
      def register_dataset_cls(cls):
          if not bypass_checks:
              if name in DATASET_REGISTRY:
                  msg = "Cannot register duplicate dataset ({}). Already registered at \n{}\n"
                  raise ValueError(
                      msg.format(name, DATASET_REGISTRY_TB[name])
                  )
              if not issubclass(cls, ClassyDataset):
                  raise ValueError(
                      "Dataset ({}: {}) must extend ClassyDataset".format(
                          name, cls.__name__
                      )
                  )
              if cls.__name__ in DATASET_CLASS_NAMES:
                  msg = (
                      "Cannot register dataset with duplicate class name({})."
                      + "Previously registered at \n{}\n"
                  )
                  raise ValueError(
                      msg.format(
                          cls.__name__,
                          DATASET_CLASS_NAMES_TB[cls.__name__],
                      )
                  )
          tb = "".join(traceback.format_stack())
          DATASET_REGISTRY[name] = cls
          DATASET_CLASS_NAMES.add(cls.__name__)
          DATASET_REGISTRY_TB[name] = tb
          DATASET_CLASS_NAMES_TB[cls.__name__] = tb
          return cls
  
      return register_dataset_cls
  
file_path: ClassyVision/classy_vision/dataset/__init__.py
imports: import traceback
  from pathlib import Path
  from classy_vision.generic.registry_utils import import_all_modules
  from .classy_dataset import ClassyDataset
  from .classy_cifar import CIFARDataset
  from .classy_hmdb51 import HMDB51Dataset
  from .classy_kinetics400 import Kinetics400Dataset
  from .classy_synthetic_image import SyntheticImageDataset
  from .classy_synthetic_image_streaming import SyntheticImageStreamingDataset
  from .classy_synthetic_video import SyntheticVideoDataset
  from .classy_ucf101 import UCF101Dataset
  from .classy_video_dataset import ClassyVideoDataset
  from .dataloader_async_gpu_wrapper import DataloaderAsyncGPUWrapper
  from .dataloader_limit_wrapper import DataloaderLimitWrapper
  from .dataloader_skip_none_wrapper import DataloaderSkipNoneWrapper
  from .dataloader_wrapper import DataloaderWrapper
  from .image_path_dataset import ImagePathDataset
label_desc: Use image node_id 2 for calling a global function with example usage: register_dataset(name, bypass_checks) and returns: register_dataset_cls, cls