from typing import Union
from pathlib import Path
import yaml


def load_config(*args: Union[str, Path]) -> dict:
    """
    Load config yaml files from path.
    :param args: path(s) of the file(s) containing configuration parameters
    """
    config = {}
    for filepath in args:
        with open(filepath) as file:
            config.update(yaml.load(file, Loader=yaml.Loader))
    return config