def METHOD_NAME(source_git_repo: git.Repo, dist_git_repo: git.Repo):
    """Patch files corresponding to commits which have identical 'patch_name'
    metadata defined are squashed.
    """
    local_project = flexmock(
        git_repo=source_git_repo, ref="HEAD", working_dir=source_git_repo.working_dir
    )
    create_commits_to_squash(source_git_repo)
    patch_generator = PatchGenerator(local_project)
    patch_list = patch_generator.create_patches(
        git_ref="0.1.0", destination=dist_git_repo.working_dir
    )
    assert len(patch_list) == 3
    assert patch_list[1].path == Path(dist_git_repo.working_dir, "distro.patch")
    assert patch_list[1].name == "distro.patch"
    assert sorted(dist_git_repo.untracked_files) == [
        "0001-Add-a-standalone-patch.patch",
        "0004-Add-another-standalone-patch.patch",
        "distro.patch",
    ]
    patch = Path(dist_git_repo.working_dir, "distro.patch").read_text()
    assert "+The first commit of the second patch." in patch
    assert "+The second commit of the second patch." in patch