def METHOD_NAME(path: Path) -> List[Any]:
    """
    Generates the hyperparameter configuration for the configuration(s) found
    at the specified path.
    Args:
        path: Either a file or directory from to read the configuration(s). If a directory is
            given, all YAML files are read recursively.
    Returns:
        The configurations.
    """
    if path.is_file():
        with path.open() as f:
            return _generate_configurations(f)
    all_configurations = []
    for file in path.glob("**/*.yaml"):
        with file.open() as f:
            all_configurations.extend(_generate_configurations(f))
    return all_configurations