code: def testScalarBounds(self):
      spec = tensor.BoundedTensorSpec(
          (), dtypes.float32, minimum=0.0, maximum=1.0
      )
  
      self.assertIsInstance(spec.minimum, np.ndarray)
      self.assertIsInstance(spec.maximum, np.ndarray)
  
      # Sanity check that numpy compares correctly to a scalar for an empty shape.
      self.assertEqual(0.0, spec.minimum)
      self.assertEqual(1.0, spec.maximum)
  
      # Check that the spec doesn't fail its own input validation.
      _ = tensor.BoundedTensorSpec(
          spec.shape, spec.dtype, spec.minimum, spec.maximum
      )
  
imports: import pickle
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.framework import full_type_pb2
  from tensorflow.core.function import trace_type
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework.type_utils import fulltypes_for_flat_tensors
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 6 for calling the BoundedTensorSpecTest obj's underlying member method code with example usage: obj.testScalarBounds() without return types