code: def _as_operation(
      op_or_tensor: Union[tf.Operation, tf.Tensor]
  ) -> tf.Operation:
      if isinstance(op_or_tensor, tf.Tensor):
          return op_or_tensor.op
      return op_or_tensor
  
imports: from typing import Any, Dict, Iterable, Mapping, Tuple, Union
  import tensorflow
  from tensorflow_transform import annotators
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.py_func import pyfunc_helper
  from tensorflow_transform.saved import constants
  from tensorflow_transform.saved import saved_model_loader
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow.python.eager import function
  from tensorflow.python.eager import wrap_function
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 2 for calling a global function with example usage: _as_operation(op_or_tensor) and returns: op_or_tensor, op_or_tensor