def pull_image(self, image, insecure=False):
        """
        pull provided image from registry

        :param image_name: ImageName, image to pull
        :param insecure: bool, allow connecting to registry over plain http
        :return: str, image (reg.om/img:v1)
        """
        logger.info("pulling image '%s' from registry", image)
        logger.debug("image = '%s', insecure = '%s'", image, insecure)
        try:
            logs_gen = self.d.pull(image.to_str(tag=False), tag=image.tag, insecure_registry=insecure, stream=True)
        except __HOLE__:
            # because changing api is fun
            logs_gen = self.d.pull(image.to_str(tag=False), tag=image.tag, stream=True)
        command_result = wait_for_command(logs_gen)
        self.last_logs = command_result.logs
        return image.to_str()
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/core.py/DockerTasker.pull_image