def METHOD_NAME(fake_repo_path, fake_package_path):
    packages = {p.name for p in fake_package_path.iterdir() if p.is_dir()}
    yield
    created_packages = {
        p.name
        for p in fake_package_path.iterdir()
        if p.is_dir() and p.name != "__pycache__"
    }
    created_packages -= packages
    for micropackage in created_packages:
        shutil.rmtree(str(fake_package_path / micropackage))
        confs = fake_repo_path / settings.CONF_SOURCE
        for each in confs.rglob(f"*{micropackage}*"):
            if each.is_file():
                each.unlink()
        tests = fake_repo_path / "src" / "tests" / micropackage
        if tests.is_dir():
            shutil.rmtree(str(tests))