code: def test_str_classes(self):
      labels = features.ClassLabel(
          names=[
              "label3",
              "label1",
              "label2",
          ]
      )
      self.assertEqual(3, labels.num_classes)
      self.assertEqual(
          labels.names,
          [
              "label3",
              "label1",
              "label2",
          ],
      )
  
      self.assertEqual(labels.str2int("label3"), 0)
      self.assertEqual(labels.str2int("label1"), 1)
      self.assertEqual(labels.str2int("label2"), 2)
      self.assertEqual(labels.int2str(0), "label3")
      self.assertEqual(labels.int2str(1), "label1")
      self.assertEqual(labels.int2str(2), "label2")
  
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 5 for calling the ClassLabelFeatureTest obj's underlying member method code with example usage: obj.test_str_classes() without return types