code: def is_read_var_op(op, version=None):
      """
      Determines if an op is a read var op.
  
      Checks if it is a `ReadVariableOp` or an `IdentityOp`. This is because
      `ResourceVariables` use `ReadVariableOps` and `RefVariables` use
      `IdentityOps`.
  
      Args:
          op (Operation): the operation to inspect
          version (int): TF major version integer
  
      Returns:
          bool: Whether or not the op is a read var op
      """
      if version == 1:
          return op.type == "Identity"
      elif version == 2:
          return op.type == "ReadVariableOp"
      elif version is None:
          return op.type == "ReadVariableOp" or op.type == "Identity"
      raise ValueError("verion=1 or version=2 or version is None")
  
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 1 for calling a global function with example usage: is_read_var_op(op, version) and returns: unknown, unknown, unknown