class_docstr: Base class to define a dataset collection.
  
  Subclasses should overwrite `info` to return populated DatasetCollectionInfo.
  
  Subclasses should also overwrite `datasets` to return a dictionary of versions
  to the datasets included in that collection's version.
class_docstr_tok: ["Base","class","to","define","a","dataset","collection",".","Subclasses","should","overwrite","`","info","`","to","return","populated","DatasetCollectionInfo",".","Subclasses","should","also","overwrite","`","datasets","`","to","return","a","dictionary","of","versions","to","the","datasets","included","in","that","collection","'s","version","."]
docstr: Returns the datasets included in a versioned dataset collection.
docstr_tok: ["Returns","the","datasets","included","in","a","versioned","dataset","collection","."]
code: def list_datasets(
      self,
      version: Union[None, str, version_lib.Version] = None,
  ) -> str:
      """Returns the datasets included in a versioned dataset collection."""
      msgs = [f"The dataset collection {self.info.name}"]
      if version:
          msgs.append(f"(version: {version})")
      msgs.append("contains the datasets:\n")
      versioned_collection = self.get_collection(version)
      for ds_name, benchmark_spec in versioned_collection.items():
          msgs.append(f"- {ds_name}: {benchmark_spec}\n")
      return " ".join(msgs)
  
imports: import dataclasses
  import inspect
  from typing import Any, List, Mapping, Optional, Type, Union
  from etils import epath
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core.utils import version
label_desc: Use image node_id 7 for calling the DatasetCollection obj's underlying member method code with example usage: obj.list_datasets(version) and returns: str