class_docstr: Proxy variable implementation.
class_docstr_tok: ["Proxy","variable","implementation","."]
docstr: Update consumer.
  
  Args:
      other (Operation): Other resource var op.
      consumer_op (Operation): The new consumer.
docstr_tok: ["Update","consumer",".","Args",":","other","(","Operation",")",":","Other","resource","var","op",".","consumer_op","(","Operation",")",":","The","new","consumer","."]
code: def _update_consumer(self, other, consumer_op):
      """
      Update consumer.
  
      Args:
          other (Operation): Other resource var op.
          consumer_op (Operation): The new consumer.
      """
      old_read_var_op = self._consumer_to_read_var_op[consumer_op]
      new_read_var_op = self._read_var_ops_mappings[other][
          old_read_var_op
      ]
      update_consumers(
          [consumer_op],
          old_tensor=old_read_var_op.outputs[0],
          new_tensor=new_read_var_op.outputs[0],
      )
  
file_path: autodist/autodist/kernel/common/proxy_variable.py
imports: from collections import defaultdict
  from tensorflow.core.framework.attr_value_pb2 import AttrValue
  from tensorflow.python import ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.util.compat import as_bytes
  from autodist.const import COLOCATION_PREFIX
  from autodist.kernel.common.utils import get_consumers, update_consumers, replica_prefix, AUTODIST_REPLICA_PREFIX, parse_optimizer_scope
  from autodist.kernel.common.variable_utils import get_read_var_ops, get_read_var_tensor, gen_read_var_op
  from autodist.utils import logging
label_desc: Use image node_id 7 for calling the ProxyVariable obj's underlying member method code with example usage: obj._update_consumer(other, consumer_op) without return types