code: def get_tensor_from_node(node):
      """Resolves a saved model graph node into a tensor to be captured.
  
      Args:
        node: a tensor, variable, or resource to be resolved into a capturable
          tensor
  
      Returns:
        A list of tensors.
      Raises:
        ValueError: if the node cannot be converted into a tensor.
      """
      with ops.init_scope():
          # TODO(b/210144904): Use __tf_tensor__ instead of `is_[...]` checks
          if getattr(node, "is_distributed_variable", False):
              return node
          elif getattr(node, "is_distributed_table", False):
              return node
          elif getattr(node, "is_sharded_variable", False):
              return node
          elif resource_variable_ops.is_resource_variable(node):
              return node.handle
          elif isinstance(node, asset.Asset):
              return node.asset_path
          elif tensor_util.is_tf_type(node):
              return node
          elif isinstance(node, resource.CapturableResource):
              # Note: this executes restored functions in the CapturableResource.
              return node.resource_handle
          raise ValueError(f"Cannot convert node {node} to tensor.")
  
file_path: tensorflow/tensorflow/core/function/capture/restore_captures.py
imports: import warnings
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.trackable import asset
  from tensorflow.python.trackable import resource
label_desc: Use image node_id 1 for calling a global function with example usage: get_tensor_from_node(node) and returns: node, node, node, node, node, node, node