code: def testSimpleConstantsExplicitCPU(self):
      config.set_device_policy("explicit")
      with ops.device("CPU:1"):
          self.assertAllClose(1.0, array_ops.ones([]))
          self.assertAllClose(0.0, array_ops.zeros([]))
          self.assertAllClose([1.0], array_ops.fill([1], 1.0))
          self.assertAllClose(2.0, constant_op.constant(1.0) * 2.0)
  
imports: from absl.testing import parameterized
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import remote
  from tensorflow.python.eager import test
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  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 random_ops
label_desc: Use image node_id 4 for calling the HardDevicePlacementTest obj's underlying member method code with example usage: obj.testSimpleConstantsExplicitCPU() without return types