code: def test_num_classes(self):
      labels = features.ClassLabel(num_classes=10)
      self.assertEqual(10, labels.num_classes)
      self.assertEqual(10, len(labels.names))
  
      self.assertEqual(1, labels.str2int("1"))
      self.assertEqual("1", labels.int2str(1))
  
      with self.assertRaisesWithPredicateMatch(ValueError, "Invalid"):
          labels.str2int("10")
      with self.assertRaisesWithPredicateMatch(ValueError, "Invalid"):
          labels.int2str(10)
  
file_path: datasets/tensorflow_datasets/core/features/class_label_feature_test.py
imports: import textwrap
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import features
label_desc: Use image node_id 3 for calling the ClassLabelFeatureTest obj's underlying member method code with example usage: obj.test_num_classes() without return types