<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _find_root_dir(path, spor_dir):
 """Search for a spor repo containing `path`. This searches for `spor_dir` in directories dominating `path`. If a directory containing `spor_dir` is found, then that directory is returned as a `pathlib.Path`. Returns: The dominating directory containing `spor_dir` as a `pathlib.Path`. Raises: ValueError: No repository is found. """


    start_path = pathlib.Path(os.getcwd() if path is None else path)
    paths = [start_path] + list(start_path.parents)

    for path in paths:
        data_dir = path / spor_dir
        if data_dir.exists() and data_dir.is_dir():
            return path

    raise ValueError('No spor repository found')