class_docstr: Register from names to classes. In particular, we say that direct subclasses of
  ReplaceableBase are "base classes" and we register subclasses of each base class
  in a separate namespace.
docstr: Retrieve a class from the registry by name
  
  Args:
      base_class_wanted: parent type of type we are looking for.
                  It determines the namespace.
                  This will typically be a direct subclass of ReplaceableBase.
      name: what to look for
  
  Returns:
      class type
docstr_tok: ["Retrieve","a","class","from","the","registry","by","name","Args",":","base_class_wanted",":","parent","type","of","type","we","are","looking","for",".","It","determines","the","namespace",".","This","will","typically","be","a","direct","subclass","of","ReplaceableBase",".","name",":","what","to","look","for","Returns",":","class","type"]
code: def get(self, base_class_wanted: Type[_X], name: str) -> Type[_X]:
      """
      Retrieve a class from the registry by name
  
      Args:
          base_class_wanted: parent type of type we are looking for.
                      It determines the namespace.
                      This will typically be a direct subclass of ReplaceableBase.
          name: what to look for
  
      Returns:
          class type
      """
      if self._is_base_class(base_class_wanted):
          base_class = base_class_wanted
      else:
          base_class = self._base_class_from_class(base_class_wanted)
          if base_class is None:
              raise ValueError(
                  f"Cannot look up {base_class_wanted}. Cannot tell what it is."
              )
      if not isinstance(name, str):
          raise ValueError(
              f"Cannot look up a {type(name)} in the registry. Got {name}."
          )
      result = self._mapping[base_class].get(name)
      if result is None:
          raise ValueError(f"{name} has not been registered.")
      if not issubclass(result, base_class_wanted):
          raise ValueError(
              f"{name} resolves to {result} which does not subclass {base_class_wanted}"
          )
      # pyre-ignore[7]
      return result
  
imports: import dataclasses
  import inspect
  import itertools
  import sys
  import warnings
  from collections import Counter, defaultdict
  from enum import Enum
  from functools import partial
  from typing import Any, Callable, Dict, get_args, get_origin, List, Optional, Tuple, Type, TypeVar, Union
  from omegaconf import DictConfig, OmegaConf, open_dict
label_desc: Use image node_id 4 for calling the _Registry obj's underlying member method code with example usage: obj.get(base_class_wanted, name) and returns: result