def METHOD_NAME(patch_list, destination_path):
    """
    Applies patches to the Git repo in the order patch_list contains them.
    If applying a patch fails this function will attempt to clean up the repo
    state by rolling back the patches using `git apply -R`
    :param patch_list: The paths of all patches to apply.
    :type patch_list: list (str)
    :param destination_path: File path to destination repo where patches will
                             be applied.
    :type destination_path: str
    """
    applied_patch_list = []
    for patch in patch_list:
        command = [
            "git",
            "apply",
            "--unsafe-paths",
            patch,
            "--directory=" + destination_path
        ]
        print("Attempting to apply patch: " + patch)
        try:
            return_code = subprocess.run(command)
        except subprocess.CalledProcessError as grepexc:
            print("error code", grepexc.returncode, grepexc.output)
            if return_code != 0:
                print("FAILED TO APPLY PATCH!")
                patches_unwind(applied_patch_list, destination_path)
                sys.exit(255)
        applied_patch_list.insert(0, patch)