code: def testIntegerSamplesExcludeMaxOfDtype(self, dtype):
      # Exclude non integer types and uint8 (has special sampling logic).
      if not dtype.is_integer or dtype == tf.uint8:
          return
      spec = tensor_spec.BoundedTensorSpec(
          (2, 3), dtype, dtype.max - 1, dtype.max
      )
      sample = tensor_spec.sample_spec_nest(spec)
      sample_ = self.evaluate(sample)
      self.assertEqual(sample_.shape, (2, 3))
      self.assertTrue(np.all(sample_ == dtype.max - 1))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 2 for calling the BoundedTensorSpecSampleTest obj's underlying member method code with example usage: obj.testIntegerSamplesExcludeMaxOfDtype(dtype) without return types