code: def get_on_write_restore_ops(var, tensor):
      """Return restore ops for AUTO and ON_WRITE variables."""
      packed_var = (
          var._packed_variable
      )  # pylint: disable=protected-access
      if packed_var is not None:
          return control_flow_ops.group(
              tuple(
                  assign_on_device(d, packed_var, tensor)
                  for d in packed_var.devices
              )
          )
      return control_flow_ops.group(
          tuple(
              assign_on_device(v.device, v, tensor) for v in var.values
          )
      )
  
imports: from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import reduce_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.saved_model import save_context
  from tensorflow.python.saved_model import save_options
  from tensorflow.python.training.saving import saveable_object
label_desc: Use image node_id 3 for calling a global function with example usage: get_on_write_restore_ops(var, tensor) and returns: control_flow_ops, control_flow_ops