code: def testSampledCandidates(self):
      with self.cached_session():
          true_classes = constant_op.constant(
              [[1, 2], [0, 4], [3, 3]], dtype=dtypes.int64
          )
          (
              sampled_candidates,
              _,
              _,
          ) = candidate_sampling_ops.all_candidate_sampler(
              true_classes, self.NUM_TRUE, self.NUM_SAMPLED, True
          )
          result = self.evaluate(sampled_candidates)
  
      expected_ids = [0, 1, 2, 3, 4]
      self.assertAllEqual(result, expected_ids)
      self.assertEqual(
          sampled_candidates.get_shape(), [self.NUM_SAMPLED]
      )
  
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 2 for calling the RangeSamplerOpsTest obj's underlying member method code with example usage: obj.testSampledCandidates() without return types