import toml


def load_toml(path: str) -> dict:
    """Loads a file at the path and parses it as a TOML file.

    This is a helper for times when you don't need the raw text content of the
    TOML file.

    Returns:
        A dictionary of the contents of the TOML file."""
    with open(path, "r") as cargo_file:
        toml_string = cargo_file.read()
        return toml.loads(toml_string)