def METHOD_NAME(*paths: Path) -> t.Iterator[None]:
    """A context manager to temporarily add a path to 'sys.path'."""
    inserted = set()
    for path in paths:
        path_str = str(path.absolute())
        if path_str not in sys.path:
            sys.path.insert(0, path_str)
            inserted.add(path_str)
    try:
        yield
    finally:
        for path_str in inserted:
            sys.path.remove(path_str)