def METHOD_NAME(self, dtype):
    # Exclude non integer types and uint8 (has special sampling logic).
    if dtype.is_floating_point or dtype == torch.uint8:
        return
    info = np.iinfo(torch_dtype_to_str(dtype))
    spec = BoundedTensorSpec(self._shape, dtype, info.max - 1,
                             info.max - 1)
    sample = spec.sample(outer_dims=(1, ))
    self.assertEqual(sample.shape, (1, ) + self._shape)
    self.assertTrue(torch.all(sample == info.max - 1))