class_docstr: A container for managing functions.
class_docstr_tok: ["A","container","for","managing","functions","."]
docstr: Adds a new function using its function_type.
  
  Args:
    fn: The function to be added to the cache.
    context: A FunctionContext representing the current context.
docstr_tok: ["Adds","a","new","function","using","its","function_type",".","Args",":","fn",":","The","function","to","be","added","to","the","cache",".","context",":","A","FunctionContext","representing","the","current","context","."]
code: def add(
      self, fn: Any, context: Optional[FunctionContext] = None
  ) -> None:
      """Adds a new function using its function_type.
  
      Args:
        fn: The function to be added to the cache.
        context: A FunctionContext representing the current context.
      """
      context = context or FunctionContext()
      self._primary[(context, fn.function_type)] = fn
      if context not in self._dispatch_dict:
          self._dispatch_dict[
              context
          ] = type_dispatch.TypeDispatchTable()
  
      self._dispatch_dict[context].add_target(fn.function_type)
  
file_path: tensorflow/tensorflow/core/function/polymorphism/function_cache.py
imports: import collections
  from typing import Any, NamedTuple, Optional
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.core.function.polymorphism import type_dispatch
label_desc: Use image node_id 4 for calling the FunctionCache obj's underlying member method code with example usage: obj.add(fn, context) without return types