code: def list_all_versions(root_dir: epath.PathLike) -> List[Version]:
      """Lists all dataset versions present on disk, sorted."""
      root_dir = epath.Path(root_dir)
      versions = []
      try:
          for path in root_dir.iterdir():
              if Version.is_valid(path.name) and path.is_dir():
                  versions.append(Version(path.name))
      except OSError:
          return versions
      return sorted(versions)
  
imports: from __future__ import annotations
  import enum
  import re
  from typing import List, Tuple, Union
  from etils import epath
label_desc: Use image node_id 2 for calling a global function with example usage: list_all_versions(root_dir) and returns: sorted, versions