def synchronize(self) -> None:
        """Synchronize the working set with pinned candidates."""
        to_add, to_update, to_remove = self.compare_with_working_set()
        manager = self.get_manager()
        for key in to_add:
            can = self.candidates[key]
            termui.logger.info("Installing %s@%s...", key, can.version)
            manager.install(can)
        for key in to_update:
            can = self.candidates[key]
            dist = self.working_set[strip_extras(key)[0]]
            dist_version = dist.version
            termui.logger.info("Updating %s@%s -> %s...", key, dist_version, can.version)
            manager.overwrite(dist, can)
        for key in to_remove:
            dist = self.working_set[key]
            termui.logger.info("Removing %s@%s...", key, dist.version)
            manager.uninstall(dist)
        if self.install_self:
            self_key = self.self_key
            assert self_key
            word = "a" if self.no_editable else "an editable"
            termui.logger.info(f"Installing the project as {word} package...")
            if self_key in self.working_set:
                dist = self.working_set[strip_extras(self_key)[0]]
                manager.overwrite(dist, self.self_candidate)
            else:
                manager.install(self.self_candidate)
        termui.logger.info("Synchronization complete.")
Synchronize the working set with pinned candidates.
src/pdm/installers/base.py