code: def list_datasets() -> dict:
      r"""Returns a dictionary of the available datasets.
  
      Return:
          dict: Nested dictionary representing the directory structure of the hosted datasets.
  
      .. seealso:: :func:`~.load_interactive`, :func:`~.list_attributes`, :func:`~.load`.
  
      **Example:**
  
      Note that the results of calling this function may differ from this example as more datasets
      are added. For updates on available data see the `datasets website <https://pennylane.ai/datasets>`_.
  
      >>> available_data = qml.data.list_datasets()
      >>> available_data.keys()
      dict_keys(["qspin", "qchem"])
      >>> available_data["qchem"].keys()
      dict_keys(["H2", "LiH", ...])
      >>> available_data['qchem']['H2'].keys()
      dict_keys(["CC-PVDZ", "6-31G", "STO-3G"])
      >>> print(available_data['qchem']['H2']['STO-3G'])
      ["0.5", "0.54", "0.62", "0.66", ...]
  
      Note that this example limits the results of the function calls for
      clarity and that as more data becomes available, the results of these
      function calls will change.
      """
  
      def remove_paths(foldermap):
          """Copies the foldermap, converting the bottom-level mapping of parameters
          to Paths to a list of the parameters."""
          value = next(iter(foldermap.values()))
  
          if not isinstance(value, typing.Mapping):
              return sorted(foldermap.keys())
  
          return {
              param: remove_paths(foldermap[param])
              for param in foldermap.keys()
          }
  
      return remove_paths(_get_foldermap())
  
imports: import typing
  import urllib.parse
  from concurrent.futures import FIRST_EXCEPTION, ThreadPoolExecutor, wait
  from functools import lru_cache
  from pathlib import Path
  from time import sleep
  from typing import List, Optional, Union
  from requests import get
  from pennylane.data.base import Dataset
  from pennylane.data.base.hdf5 import open_hdf5_s3
  from .foldermap import DataPath, FolderMapView, ParamArg
  from .params import DEFAULT, FULL, format_params
label_desc: Use image node_id 8 for calling a global function with example usage: list_datasets() and returns: remove_paths, unknown, sorted