def squash(self, image):
        # Do the actual squashing
        new_image_id = image.squash()

        self.log.info(
            "New squashed image ID is %s" % new_image_id)

        if self.output_path:
            # Move the tar archive to the specified path
            image.export_tar_archive(self.output_path)

        if self.load_image:
            # Load squashed image into Docker
            image.load_squashed_image()

        image.cleanup()

        self.log.info("Done")

        return new_image_id
dataset/ETHPy150Open goldmann/docker-squash/docker_squash/squash.py/Squash.squash/original