code: def testTwoDeviceFunctions(self):
      with ops.Graph().as_default() as g:
          var_0 = gen_state_ops.variable(
              shape=[1],
              dtype=dtypes.float32,
              name="var_0",
              container="",
              shared_name="",
          )
          with g.device(TestDeviceFuncPinVariableToCpu):
              var_1 = gen_state_ops.variable(
                  shape=[1],
                  dtype=dtypes.float32,
                  name="var_1",
                  container="",
                  shared_name="",
              )
          var_2 = gen_state_ops.variable(
              shape=[1],
              dtype=dtypes.float32,
              name="var_2",
              container="",
              shared_name="",
          )
          var_3 = gen_state_ops.variable(
              shape=[1],
              dtype=dtypes.float32,
              name="var_3",
              container="",
              shared_name="",
          )
          with g.device(TestDeviceFuncPinVariableToCpu):
              var_4 = gen_state_ops.variable(
                  shape=[1],
                  dtype=dtypes.float32,
                  name="var_4",
                  container="",
                  shared_name="",
              )
              with g.device("/device:GPU:0"):
                  var_5 = gen_state_ops.variable(
                      shape=[1],
                      dtype=dtypes.float32,
                      name="var_5",
                      container="",
                      shared_name="",
                  )
              var_6 = gen_state_ops.variable(
                  shape=[1],
                  dtype=dtypes.float32,
                  name="var_6",
                  container="",
                  shared_name="",
              )
  
      self.assertDeviceEqual(var_0.device, None)
      self.assertDeviceEqual(var_1.device, "/device:CPU:0")
      self.assertDeviceEqual(var_2.device, None)
      self.assertDeviceEqual(var_3.device, None)
      self.assertDeviceEqual(var_4.device, "/device:CPU:0")
      self.assertDeviceEqual(var_5.device, "/device:GPU:0")
      self.assertDeviceEqual(var_6.device, "/device:CPU:0")
  
imports: from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import function_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function
  from tensorflow.python.framework import graph_util
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gen_state_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 1 for calling the GraphUtilTest obj's underlying member method code with example usage: obj.testTwoDeviceFunctions() without return types