code: def _reraise_unexpected_error(func):
      """A decorator that reraises certain exceptions with modified msg and type."""
  
      def wrapper(self, tensor_or_op):
          """Wrapper when calling func to re-raise exceptions."""
          try:
              return func(self, tensor_or_op)
          except _UnexpectedPlaceholderError as e:
              context = (
                  f" tf.function name: `{e.func_graph_name}`"
                  if e.func_graph_name
                  else ""
              )
              raise ValueError(
                  "The tensor_or_op {} depended on a placeholder ({}) that was not "
                  "in the input_signature.  This may have be caused by manually "
                  "adding a placeholder to the graph.{}".format(
                      tensor_or_op, e.tensor, context
                  )
              ) from e
          except _UnexpectedTableError as e:
              if e.func_graph_name:
                  raise ValueError(
                      "The tensor_or_op {} depended on an initializable table ({}) that "
                      "is part of a tf.function graph ({}), this is not supported. This"
                      " may be a result of initializing a table in a tf.function"
                      "".format(tensor_or_op, e.op, e.func_graph_name)
                  ) from e
              else:
                  raise ValueError(
                      "The tensor_or_op {} depended on an initializable table ({}) that "
                      "was not tracked by the graph analysis.  This may be caused by "
                      "adding an initializable table without adding its initializer to "
                      "the collection tf.GraphKeys.TABLE_INITIALIZERS".format(
                          tensor_or_op, e.op
                      )
                  ) from e
  
      return wrapper
  
imports: import collections
  import copy
  import hashlib
  import itertools
  from typing import Iterable, List, Mapping, Optional, Set, Union
  import uuid
  from absl import logging
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import nodes
  from tensorflow_transform import tf_utils
  from tfx_bsl.types import tfx_namedtuple
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 4 for calling a global function with example usage: _reraise_unexpected_error(func) and returns: wrapper, func