def METHOD_NAME(path: Optional[Path] = None) -> Path:
    if path is None:
        path = Path.cwd()
    here = path
    while here.parent != here:
        config = here / ".neuro.toml"
        if config.exists():
            return here
        here = here.parent
    raise ConfigError(f"Project root is not found for {path}")