code: def _ensure_image_registry(self, image):
          
          image_with_registry = image.copy()
          if self.parent_registry:
              # if registry specified in Dockerfile image, ensure it's the one allowed by config
              if image.registry and image.registry != self.parent_registry:
                  error = (
                      "Registry specified in dockerfile image doesn't match configured one. "
                      "Dockerfile: '%s'; expected registry: '%s'"
                      % (image, self.parent_registry))
                  self.log.error("%s", error)
                  raise RuntimeError(error)
  
              image_with_registry.registry = self.parent_registry
  
          return image_with_registry
docs: If plugin configured with a parent registry, ensure the image uses it