import yaml


def read_yml(yml_filename):
    """
    Reads in a yaml file.

    Inputs:
        :yml_filename: (string) path to the yml.

    Outputs:
        :parsed_yml_file: (dictionary) key-value pairs as read from the yaml
            file.

    """
    file = open(yml_filename)
    parsed_yaml_file = yaml.load(file, Loader=yaml.SafeLoader)
    file.close()
    return parsed_yaml_file