def _get_object(name: str) -> Optional[base.Trackable]:
  """If an object is being tracked using `name` return it, else None."""
  module = TFGraphContext.get_module_to_export()
  # The `preprocessing_fn` should always be invoked within a TFGraphContext. If
  # not, module will be None.
  if module is None:
    raise RuntimeError(
        f'No module found to track {name} with. Check that the `preprocessing_fn` is'
        ' invoked within a `TFGraphContext` with a valid '
        '`TFGraphContext.module_to_export`.')
  return getattr(module, name, None)
If an object is being tracked using `name` return it, else None.
tensorflow_transform/annotators.py