code: def tag_image(self, image, target_image, force=False):
          
          logger.info("tagging image '%s' as '%s'", image, target_image)
          logger.debug("image = '%s', target_image_name = '%s'", image, target_image)
          if not isinstance(image, ImageName):
              image = ImageName.parse(image)
  
          if image != target_image:
              response = self.d.tag(
                  image.to_str(),
                  target_image.to_str(tag=False),
                  tag=target_image.tag,
                  force=force)  # returns True/False
              if not response:
                  logger.error("failed to tag image")
                  raise RuntimeError("Failed to tag image '%s': target_image = '%s'" %
                                     image.to_str(), target_image)
          else:
              logger.debug('image already tagged correctly, nothing to do')
          return target_image.to_str()
docs: tag provided image with specified image_name, registry and tag
  
          :param image: str or ImageName, image to tag
          :param target_image: ImageName, new name for the image
          :param force: bool, force tag the image?
          :return: str, image (reg.om/img:v1)