from typing import Union
from pathlib import Path
from typing import Any
import yaml


def load_yaml(filepath: Union[str, Path]) -> Any:
    """Load data from a yaml file."""
    with open(filepath, "r") as f:
        data = yaml.load(f, yaml.FullLoader)
    return data