code: def test_label(self, dtype):
      self.assertFeatureEagerOnly(
          feature=feature_lib.Dataset(
              {
                  "label": feature_lib.ClassLabel(
                      names=["left", "right"]
                  ),
              },
              length=None,
          ),
          shape={"label": ()},
          dtype={"label": dtype},
          serialized_info={
              "label": feature_lib.TensorInfo(
                  shape=(None,), dtype=dtype
              ),
          },
          tests=[
              testing.FeatureExpectationItem(
                  value=[
                      {"label": "right"},
                      {"label": "left"},
                      {"label": "left"},
                  ],
                  expected=tf.data.Dataset.from_tensor_slices(
                      {"label": [1, 0, 0]}
                  ),
                  # expected_np=Not implemented yet,
              ),
              # Variable sequence length
              testing.FeatureExpectationItem(
                  value=dataset_utils.as_numpy(
                      tf.data.Dataset.from_tensor_slices(
                          {"label": ["right", "left", "right", "left"]}
                      )
                  ),
                  expected=tf.data.Dataset.from_tensor_slices(
                      {"label": [1, 0, 1, 0]}
                  ),
                  expected_np=[
                      {"label": 1},
                      {"label": 0},
                      {"label": 1},
                      {"label": 0},
                  ],
              ),
          ],
          test_attributes=dict(_length=None),
      )
  
imports: import pickle
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import decode
  from tensorflow_datasets.core import features
label_desc: Use image node_id 2 for calling the DatasetDictFeatureTest obj's underlying member method code with example usage: obj.test_label(dtype) without return types