code: def pull_image(self, image, insecure=False, dockercfg_path=None):
          
          logger.info("pulling image '%s' from registry", image)
          logger.debug("image = '%s', insecure = '%s'", image, insecure)
          tag = image.tag
  
          if dockercfg_path:
              self.login(registry=image.registry, docker_secret_path=dockercfg_path)
          try:
              command_result = self.retry_generator(self.d.pull,
                                                    image.to_str(tag=False),
                                                    tag=tag, insecure_registry=insecure,
                                                    decode=True, stream=True)
          except TypeError:
              # because changing api is fun
              command_result = self.retry_generator(self.d.pull,
                                                    image.to_str(tag=False),
                                                    tag=tag, decode=True, stream=True)
  
          self.last_logs = command_result.logs
          return image.to_str()
docs: pull provided image from registry
  
          :param image_name: ImageName, image to pull
          :param insecure: bool, allow connecting to registry over plain http
          :param dockercfg_path: str, path to dockercfg
          :return: str, image (reg.om/img:v1)