from pathlib import Path
from typing import Dict
from typing import Any
import yaml


def load_yaml(path: Path) -> Dict[str, Any]:
    """Load a YAML file to create a dictionary."""
    with path.open() as f:
        return yaml.load(f, Loader=yaml.SafeLoader)