import yaml


def _read_yaml(fpath, loader=yaml.Loader):
    """
    Returns contents of YAML file as parsed by `yaml.load`.

    :param fpath: file path
    :param loader: Loader class.
    :return: contents of YAML file
    """
    with open(fpath, 'r') as reader:
        contents = yaml.load(reader, Loader=loader)

    return contents