def METHOD_NAME(self, temp_subvols, *, boot):
    self._check_shadow_ba()
    dest_subvol = temp_subvols.caller_will_create("shadow_ba")
    with dest_subvol.maybe_create_externally():
        self._check_yum_dnf_ret(
            "i will shadow\n",
            rb"Installing\s+: rpm-test-carrot-2-rc0.x86_64",
            self._yum_or_dnf_install(
                self._PROG,
                "rpm-test-carrot",
                extra_args=(
                    *(["--boot"] if boot else []),
                    *(
                        "--shadow-path",
                        "/rpm_test/carrot.txt",
                        "/i_will_shadow",
                    ),
                    f"--snapshot-into={dest_subvol.path()}",
                ),
                # This container will shadow the default RPM installer.
                run_prog_as_is=True,
                # Our RPM installer wrapper doesn't support updating
                # shadowed files with `--installroot` other than `/`.
                install_root="/",
                build_appliance_pair=self._SHADOW_BA_PAIR,
            ),
        )
    # The RPM installation worked as expected despite the shadow
    self.assertEqual(
        "carrot 2 rc0\n",
        dest_subvol.path("/rpm_test/carrot.txt").read_text(),
    )
    self._check_shadow_ba()