docstr: Tests that the context device is correctly updated.
docstr_tok: ["Tests","that","the","context","device","is","correctly","updated","."]
code: def testContextDeviceUpdated(self):
      """Tests that the context device is correctly updated."""
  
      with ops.device("cpu:0"):
          x1 = array_ops.ones([2, 2])
          x2 = array_ops.ones([2, 2])
          y = math_ops.matmul(x1, x2)
      np.testing.assert_array_equal([[2, 2], [2, 2]], y.numpy())
  
      # `y` is placed on the local CPU as expected.
      self.assertEqual(
          y.device, "/job:%s/replica:0/task:0/device:CPU:0" % JOB_NAME
      )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.core.protobuf import tensorflow_server_pb2
  from tensorflow.python import pywrap_tfe
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import remote
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 13 for calling the RemoteExecutionTest obj's underlying member method code with example usage: obj.testContextDeviceUpdated() without return types