code: def testCurrentDeviceWithGlobalGraph(self):
      with ops.device("/cpu:0"):
          self.assertEqual(device_util.current(), "/device:CPU:0")
  
      with ops.device("/job:worker"):
          with ops.device("/cpu:0"):
              self.assertEqual(
                  device_util.current(), "/job:worker/device:CPU:0"
              )
  
      with ops.device("/cpu:0"):
          with ops.device("/gpu:0"):
              self.assertEqual(device_util.current(), "/device:GPU:0")
  
file_path: tensorflow-upstream/tensorflow/python/distribute/device_util_test.py
imports: from absl.testing import parameterized
  from tensorflow.core.protobuf import tensorflow_server_pb2
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import device_util
  from tensorflow.python.distribute import multi_worker_test_base
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 2 for calling the DeviceUtilTest obj's underlying member method code with example usage: obj.testCurrentDeviceWithGlobalGraph() without return types