import yaml


def load_yaml(filename):
    """
     Returns the contents of a yaml file in a list

     Parameters
     ----------
     filename : string
        The full filepath string '.../.../.yaml' of the yaml file to be loaded

     Returns
     -------
     cfg : dict
        Contents of the yaml file (may be a nested dict)
    """

    with open(filename, 'r') as ymlfile:
        cfg = yaml.safe_load(ymlfile)
    return cfg