import yaml


def load_config_file(filename):
    """Load configuration from YAML file."""
    docs = yaml.load_all(open(filename, 'r'), Loader=yaml.SafeLoader)
    config_dict = dict()
    for doc in docs:
        for k, v in doc.items():
            config_dict[k] = v
    return config_dict