class_docstr: A class that tracks a list of trackable objects.
class_docstr_tok: ["A","class","that","tracks","a","list","of","trackable","objects","."]
docstr: Add `trackable_object` to list of objects tracked.
docstr_tok: ["Add","`","trackable_object","`","to","list","of","objects","tracked","."]
code: def add_trackable_object(
      self, trackable_object: base.Trackable, name: Optional[str]
  ):
      """Add `trackable_object` to list of objects tracked."""
      if name is None:
          self._trackable_objects.append(trackable_object)
      else:
          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`."
              )
          if hasattr(module, name):
              raise ValueError(
                  f"An object with name {name} is already being tracked. Check that a "
                  "unique name was passed."
              )
          setattr(module, name, trackable_object)
  
file_path: transform/tensorflow_transform/annotators.py
imports: import contextlib
  import os
  from typing import Callable, List, Optional
  import tensorflow
  from tensorflow_transform.graph_context import TFGraphContext
  from tensorflow_transform.keras_lib import tf_keras
  from tensorflow.python.trackable import base
label_desc: Use image node_id 3 for calling the ObjectTracker obj's underlying member method code with example usage: obj.add_trackable_object(trackable_object, name) without return types