def get_parser() -> ArgumentParser:
    """Create a new parser if none is provided."""
    parser = ArgumentParser()
    parser.add_argument("--config", type=str | Path, help="Configuration file path.", required=True)
    parser.add_argument("--root", type=str | Path, help="Results root dir path.", required=True)

    return parser
Create a new parser if none is provided.
tools/tiled_ensemble/eval.py