def METHOD_NAME(feastignore_contents: Optional[str]):
    with TemporaryDirectory() as tmp_dir:
        repo_root = Path(tmp_dir)
        (repo_root / "foo").mkdir()
        (repo_root / "foo1").mkdir()
        (repo_root / "foo1/bar").mkdir()
        (repo_root / "bar").mkdir()
        (repo_root / "bar/subdir1").mkdir()
        (repo_root / "bar/subdir1/subdir2").mkdir()
        (repo_root / "a.py").touch()
        (repo_root / "foo/b.py").touch()
        (repo_root / "foo1/c.py").touch()
        (repo_root / "foo1/bar/d.py").touch()
        (repo_root / "bar/e.py").touch()
        (repo_root / "bar/subdir1/f.py").touch()
        (repo_root / "bar/subdir1/subdir2/g.py").touch()
        if feastignore_contents:
            with open(repo_root / ".feastignore", "w") as f:
                f.write(feastignore_contents)
        yield repo_root