def METHOD_NAME(
    name: str, relative_to: str | Path | None = SOURCE_DIR
) -> Path:
    path = _get_root_example_path_by_name(name, relative_to)
    if path.is_dir():
        return path / "main.py"
    else:
        return path.with_suffix(".py")