def rollback(self):
        # type: () -> None
        """Rollback the changes previously made by remove()."""
        if not self._moved_paths.can_rollback:
            logger.error(
                "Can't roll back %s; was not uninstalled",
                self.dist.project_name,
            )
            return
        logger.info('Rolling back uninstall of %s', self.dist.project_name)
        self._moved_paths.rollback()
        for pth in self.pth.values():
            pth.rollback()
Rollback the changes previously made by remove().
product/gradle-plugin/src/main/python/pip/_internal/req/req_uninstall.py