class_docstr: Static class for keeping track of available datasets.
class_docstr_tok: ["Static","class","for","keeping","track","of","available","datasets","."]
docstr: Add a dataset to the registry, i.e. register a dataset.
  
  Args:
    name: Dataset name (must be unique).
    builder_fn: Function to be called to construct the datasets. Must accept
      dataset-specific arguments and return a dataset description.
  
  Raises:
    KeyError: If the provided name is not unique.
docstr_tok: ["Add","a","dataset","to","the","registry",",","i.e",".","register","a","dataset",".","Args",":","name",":","Dataset","name","(","must","be","unique",")",".","builder_fn",":","Function","to","be","called","to","construct","the","datasets",".","Must","accept","dataset-specific","arguments","and","return","a","dataset","description",".","Raises",":","KeyError",":","If","the","provided","name","is","not","unique","."]
code: def add(
      cls, name: str, builder_fn: Callable[..., dataset_utils.Dataset]
  ):
      """Add a dataset to the registry, i.e. register a dataset.
  
      Args:
        name: Dataset name (must be unique).
        builder_fn: Function to be called to construct the datasets. Must accept
          dataset-specific arguments and return a dataset description.
  
      Raises:
        KeyError: If the provided name is not unique.
      """
      if name in cls._REGISTRY:
          raise KeyError(
              f"Dataset with name ({name}) already registered."
          )
      cls._REGISTRY[name] = builder_fn
  
file_path: scenic/scenic/dataset_lib/datasets.py
imports: import functools
  import importlib
  from typing import Callable, List
  from absl import logging
  from scenic.dataset_lib import dataset_utils
label_desc: Use image node_id 1 for calling the DatasetRegistry obj's underlying member method code with example usage: obj.add(cls, name, builder_fn) without return types