<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def push_image(self, image, insecure=False):
 """ push provided image to registry :param image: ImageName :param insecure: bool, allow connecting to registry over plain http :return: str, logs from push """

        logger.info("pushing image '%s'", image)
        logger.debug("image: '%s', insecure: '%s'", image, insecure)
        try:
            # push returns string composed of newline separated jsons; exactly what 'docker push'
            # outputs
            command_result = self.retry_generator(self.d.push,
                                                  image.to_str(tag=False),
                                                  tag=image.tag, insecure_registry=insecure,
                                                  decode=True, stream=True)
        except TypeError:
            # because changing api is fun
            command_result = self.retry_generator(self.d.push,
                                                  image.to_str(tag=False),
                                                  tag=image.tag, decode=True, stream=True)

        self.last_logs = command_result.logs
        return command_result.parsed_logs