code: def test_empty(self):
      # Encoding should works if num_classes=0
      labels = features.ClassLabel(num_classes=0)
      self.assertEqual(0, labels.num_classes)
      self.assertEqual(0, len(labels.names))
      self.assertEqual(-1, labels.encode_example(-1))
  
      labels = features.ClassLabel(names=[])
      self.assertEqual(0, labels.num_classes)
      self.assertEqual(0, len(labels.names))
      self.assertEqual(-1, labels.encode_example(-1))
  
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 4 for calling the ClassLabelFeatureTest obj's underlying member method code with example usage: obj.test_empty() without return types