code: def get_read_var_tensor(var_op):
      """
      Given a var op, get the tensor of its default readable value.
  
      Args:
          var_op (Operation): the variable op
  
      Returns:
          Tensor: The tensor of its default readable value
      """
      if var_op.type == "VarHandleOp":
          for read_var_op in get_read_var_ops(var_op):
              if read_var_op.name.endswith("/Read/ReadVariableOp"):
                  return read_var_op.outputs[0]
      elif var_op.type == "VariableV2" or is_read_var_op(var_op):
          return var_op.outputs[0]
      raise ValueError(
          "Can't get the variable reading tensor from '{}'. "
          "It may not be a proper variable op.".format(var_op.name)
      )
  
file_path: autodist/autodist/kernel/common/variable_utils.py
imports: from tensorflow.python.eager import context, tape
  from tensorflow.python.ops import gen_resource_variable_ops, array_ops
  from tensorflow.python.ops.resource_variable_ops import _maybe_set_handle_data
  from autodist.kernel.common.utils import get_consumers
label_desc: Use image node_id 3 for calling a global function with example usage: get_read_var_tensor(var_op) and returns: var_op, read_var_op