code: def testCandidateOutOfRange(self):
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError), "out of range"
      ):
          self.evaluate(
              candidate_sampling_ops.log_uniform_candidate_sampler(
                  true_classes=[[0, 10]],
                  num_true=2,
                  num_sampled=1000,
                  unique=False,
                  range_max=2,
              )
          )
  
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError), "out of range"
      ):
          self.evaluate(
              candidate_sampling_ops.log_uniform_candidate_sampler(
                  true_classes=[[0, -10]],
                  num_true=2,
                  num_sampled=1000,
                  unique=False,
                  range_max=2,
              )
          )
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/random/candidate_sampler_ops_test.py
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import candidate_sampling_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the RangeSamplerOpsTest obj's underlying member method code with example usage: obj.testCandidateOutOfRange() without return types