class_docstr: Static class for keeping track of available datasets.
class_docstr_tok: ["Static","class","for","keeping","track","of","available","datasets","."]
docstr: Get a dataset from the registry by its name.
  
  Args:
    name: Dataset name.
  
  Returns:
    Dataset builder function that accepts dataset-specific parameters and
    returns a dataset description.
  
  Raises:
    KeyError: If the dataset is not found.
docstr_tok: ["Get","a","dataset","from","the","registry","by","its","name",".","Args",":","name",":","Dataset","name",".","Returns",":","Dataset","builder","function","that","accepts","dataset-specific","parameters","and","returns","a","dataset","description",".","Raises",":","KeyError",":","If","the","dataset","is","not","found","."]
code: def get(cls, name: str) -> Callable[..., dataset_utils.Dataset]:
      """Get a dataset from the registry by its name.
  
      Args:
        name: Dataset name.
  
      Returns:
        Dataset builder function that accepts dataset-specific parameters and
        returns a dataset description.
  
      Raises:
        KeyError: If the dataset is not found.
      """
      if name not in cls._REGISTRY:
          if name in _IMPORT_TABLE:
              module = _IMPORT_TABLE[name]
              importlib.import_module(module)
              logging.info(
                  "On-demand import of dataset (%s) from module (%s).",
                  name,
                  module,
              )
              if name not in cls._REGISTRY:
                  raise KeyError(
                      f"Imported module ({module}) did not register dataset"
                      f"({name}). Please check that dataset names match."
                  )
          else:
              raise KeyError(
                  f"Unknown dataset ({name}). Did you import the dataset "
                  f"module explicitly?"
              )
      return cls._REGISTRY[name]
  
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 2 for calling the DatasetRegistry obj's underlying member method code with example usage: obj.get(cls, name) and returns: cls