code: def get_dataset_config(
      name: str, path: Union[Path, str] = DEFAULT_DATA_PATH
  ) -> DatasetConfig:
      """
      This method creates the dataset configuration of the model with the
      specified name.
  
      Args:
          name: The canonical name of the dataset. See `DATASET_REGISTRY`.
          path: The root of the dataset directory.
  
      Returns:
          The dataset configuration.
      """
      # Get the dataset
      assert (
          name in DATASET_REGISTRY
      ), f"Dataset name '{name}' is unknown."
      return DATASET_REGISTRY[name](Path(path))
  
imports: from pathlib import Path
  from typing import Dict, Type, TypeVar, Union
  from tsbench.constants import DEFAULT_DATA_PATH
  from ._base import DatasetConfig
label_desc: Use image node_id 2 for calling a global function with example usage: get_dataset_config(name, path) and returns: DATASET_REGISTRY