def directory_tree(tmp_path):
    """Create a test directory tree."""
    # initialize
    p = tmp_path / "directory_tree"
    p.mkdir()
    p.joinpath("file1").write_text("123")
    p.joinpath("dir1").mkdir()
    p.joinpath("dir1/file2").write_text("456")
    p.joinpath("dir1/file3").write_text("789")
    return p