class_docstr: Lists versions in the dataset collection, along with their datasets.
docstr: List versions.
docstr_tok: ["List","versions","."]
code: def _list_versions(self, loader: tfds.core.DatasetCollectionLoader):
      """List versions."""
      # Default version is the latest.
      default_version = loader.collection.get_latest_version()
      all_versions = [
          *loader.collection.info.release_notes,
          *loader.collection.datasets,
      ]
  
      all_versions_and_notes = loader.collection.info.release_notes
  
      all_versions = set(tfds.core.Version(v) for v in all_versions)
  
      for v in sorted(all_versions):  # List all available versions.
          if v == default_version:  # Highlight the default version.
              version_name = "**`{}`** (default)".format(str(v))
          else:
              version_name = "`{}`".format(str(v))
          description = all_versions_and_notes.get(
              str(v), "No release notes."
          )
          yield f"    * {version_name}: {description}"
  
imports: import abc
  import textwrap
  from typing import List
  import tensorflow_datasets
  from tensorflow_datasets.scripts.documentation import dataset_markdown_builder
  from tensorflow_datasets.scripts.documentation import doc_utils
label_desc: Use image node_id 1 for calling the CollectionVersionSection obj's underlying member method code with example usage: obj._list_versions(loader) without return types