def expand_matcher_configs(ctx, param, matcher_configs):
    """Expand the given matcher configuration files

    Expanding directories recursively for YAML files.
    """
    expanded_matcher_configs = []
    for matcher_config_file_location in (Path(f) for f in matcher_configs):
        if matcher_config_file_location.is_dir():
            expanded_matcher_configs.extend(
                list(matcher_config_file_location.glob("**/*.yml"))
            )
        else:
            expanded_matcher_configs.append(matcher_config_file_location)

    return expanded_matcher_configs