class_docstr: Proxy variable implementation.
class_docstr_tok: ["Proxy","variable","implementation","."]
docstr: Build a proxy of the original variable on `destination_device`.
  
  Args:
      destination_device (DeviceSpecV2): the destination device where the proxy is on.
docstr_tok: ["Build","a","proxy","of","the","original","variable","on","`","destination_device","`",".","Args",":","destination_device","(","DeviceSpecV2",")",":","the","destination","device","where","the","proxy","is","on","."]
code: def _build_proxy_on(self, destination_device):
      """
      Build a proxy of the original variable on `destination_device`.
  
      Args:
          destination_device (DeviceSpecV2): the destination device where the proxy is on.
      """
      is_gpu = (
          destination_device.device_type.upper() == "GPU"
          if destination_device.device_type
          else False
      )
      prefix = (
          replica_prefix(destination_device.device_index)
          if is_gpu
          else replica_prefix("CPU")
      )
      with ops.device(destination_device):
          proxy_var = variable_scope.get_variable(
              ops.prepend_name_scope(self._this_op.name, prefix),
              dtype=self._dtype,
              initializer=self._initial_value,
              trainable=False,
          )
      self._graph_item.info.update_variables(
          [proxy_var], replace=False
      )  # Should we update graph_item.info?
      self._proxy_vars.append(proxy_var)
      self._proxy_var_init_ops.append(
          proxy_var.assign(get_read_var_tensor(self._this_op))
      )
      self._mirror_all_read_var_ops()
      self._update_all_consumers()
  
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 2 for calling the ProxyVariable obj's underlying member method code with example usage: obj._build_proxy_on(destination_device) without return types