code: def from_function_def(
      function_def: function_pb2.FunctionDef,
      function_type: function_type_lib.FunctionType,
  ) -> AtomicFunction:
      """Create a new AtomicFunction from FunctionDef + FunctionType."""
      bound_context = context.context()
      if bound_context.has_function(
          compat.as_bytes(function_def.signature.name)
      ):
          raise ValueError("Function already registered in context.")
  
      bound_context.add_function_def(function_def)
      return AtomicFunction(
          function_def.signature.name, bound_context, function_type
      )
  
imports: import dataclasses
  import traceback
  import typing
  from typing import Any, Dict, List, Optional, Sequence, Union
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import function_pb2
  from tensorflow.core.framework import graph_debug_info_pb2
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.python.client import pywrap_tf_session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import record
  from tensorflow.python.eager.polymorphic_function import attributes
  from tensorflow.python.eager.polymorphic_function import function_type_utils
  from tensorflow.python.framework import auto_control_deps_utils
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.types import core
  from tensorflow.python.util import compat
  from tensorflow.python.util import function_utils
  from tensorflow.python.util import tf_stack
label_desc: Use image node_id 4 for calling a global function with example usage: from_function_def(function_def, function_type) and returns: AtomicFunction