def METHOD_NAME(config_path):
    if config_path.endswith('.yaml'):
        yaml_files = [config_path]
    else:
        yaml_files = glob.glob(os.path.join(config_path, "*.yaml"))
    for yaml_path in yaml_files:
        with open(yaml_path) as yaml_file:
            data = yaml.safe_load(yaml_file)
            yield yaml_path, data