from pathlib import Path
from typing import MutableMapping
from typing import Any
import toml


def toml_loader(filepath: Path) -> MutableMapping[str, Any]:
    """Open and load a dict from a TOML file."""
    with filepath.open("r") as f:
        return toml.load(f)