class_docstr: Subclasses will be registered and given a `name` property.
code: def __init_subclass__(
      cls, skip_registration=False, **kwargs
  ):  # pylint: disable=redefined-outer-name
      super().__init_subclass__(**kwargs)
  
      # Set the name if the dataset does not define it.
      # Use __dict__ rather than getattr so subclasses are not affected.
      if not cls.__dict__.get("name"):
          if cls.__name__ == "Builder":
              # Config-based builders should be defined with a class named "Builder".
              # In such a case, the builder name is extracted from the module if it
              # follows conventions:
              module_name = cls.__module__.rsplit(".", 1)[-1]
              if module_name.endswith(_BUILDER_MODULE_SUFFIX):
                  cls.name = module_name[: -len(_BUILDER_MODULE_SUFFIX)]
              elif (
                  "." in cls.__module__
              ):  # Extract dataset name from package name.
                  cls.name = cls.__module__.rsplit(".", 2)[-2]
              else:
                  raise AssertionError(
                      "When using `Builder` as class name, the dataset builder name is "
                      'inferred from module name if named "*_dataset_builder" or from '
                      f'package name, but there is no package in "{cls.__module__}".'
                  )
          else:  # Legacy builders.
              cls.name = naming.camelcase_to_snakecase(cls.__name__)
  
      is_abstract = inspect.isabstract(cls)
  
      # Capture all concrete datasets, including when skip registration is True.
      # This ensures that `builder_cls_from_module` can load the datasets
      # even when the module has been imported inside a `skip_registration`
      # context.
      if not is_abstract:
          _MODULE_TO_DATASETS[cls.__module__].append(cls)
  
      # Skip dataset registration within contextmanager, or if skip_registration
      # is passed as meta argument.
      if skip_registration or _skip_registration:
          return
  
      # Check for name collisions
      if (
          py_utils.is_notebook()
      ):  # On Colab/Jupyter, we allow overwriting
          pass
      elif cls.name in _DATASET_REGISTRY:
          raise ValueError(
              f"Dataset with name {cls.name} already registered."
          )
      elif cls.name in _ABSTRACT_DATASET_REGISTRY:
          raise ValueError(
              f"Dataset with name {cls.name} already registered as abstract."
          )
  
      # Add the dataset to the registers
      if is_abstract:
          _ABSTRACT_DATASET_REGISTRY[cls.name] = cls
      else:
          _DATASET_REGISTRY[cls.name] = cls
  
imports: import abc
  import collections
  import contextlib
  import functools
  import importlib
  import inspect
  import os.path
  from typing import ClassVar, Dict, Iterator, List, Type, Text, Tuple
  from etils import epath
  from tensorflow_datasets.core import constants
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import visibility
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import resource_utils
label_desc: Use image node_id 1 for calling the RegisteredDataset obj's underlying member method code with example usage: obj.__init_subclass__(cls, skip_registration) without return types