from typing import Union
import yaml


def from_yaml(path: str) -> Union[dict, list, str, int]:
    """Returns the loaded python object from a yaml file given by `path`"""
    with open(path) as f:
        return yaml.safe_load(f.read())