code: def test_labels(self):
      self.assertFeature(
          feature=features.ClassLabel(names=["left", "right"]),
          dtype=tf.int64,
          shape=(),
          tests=[
              testing.FeatureExpectationItem(
                  value=1,
                  expected=1,
              ),
              testing.FeatureExpectationItem(
                  value="left",
                  expected=0,
              ),
              testing.FeatureExpectationItem(
                  value="right",
                  expected=1,
              ),
          ],
          test_attributes=dict(
              num_classes=2,
              names=["left", "right"],
          ),
      )
  
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 2 for calling the ClassLabelFeatureTest obj's underlying member method code with example usage: obj.test_labels() without return types