<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self):
 """ Pull parent images and retag them uniquely for this build. """

        build_json = get_build_json()
        current_platform = platform.processor() or 'x86_64'
        self.manifest_list_cache = {}
        organization = get_registries_organization(self.workflow)

        for nonce, parent in enumerate(sorted(self.workflow.builder.parent_images.keys(),
                                              key=str)):
            if base_image_is_custom(parent.to_str()):
                continue

            image = parent
            is_base_image = False
            # original_base_image is an ImageName, so compare parent as an ImageName also
            if image == self.workflow.builder.original_base_image:
                is_base_image = True
                image = self._resolve_base_image(build_json)

            image = self._ensure_image_registry(image)

            if organization:
                image.enclose(organization)
                parent.enclose(organization)

            if self.check_platforms:
                # run only at orchestrator
                self._validate_platforms_in_image(image)
                self._collect_image_digests(image)

            # try to stay with digests
            image_with_digest = self._get_image_with_digest(image, current_platform)
            if image_with_digest is None:
                self.log.warning("Cannot resolve platform '%s' specific digest for image '%s'",
                                 current_platform, image)
            else:
                self.log.info("Replacing image '%s' with '%s'", image, image_with_digest)
                image = image_with_digest

            if self.check_platforms:
                new_arch_image = self._get_image_for_different_arch(image, current_platform)
                if new_arch_image:
                    image = new_arch_image

            if self.inspect_only:
                new_image = image
            else:
                new_image = self._pull_and_tag_image(image, build_json, str(nonce))
            self.workflow.builder.recreate_parent_images()
            self.workflow.builder.parent_images[parent] = new_image

            if is_base_image:
                if organization:
                    # we want to be sure we have original_base_image enclosed as well
                    self.workflow.builder.original_base_image.enclose(organization)
                self.workflow.builder.set_base_image(
                    str(new_image), insecure=self.parent_registry_insecure,
                    dockercfg_path=self.parent_registry_dockercfg_path
                )
        self.workflow.builder.parents_pulled = not self.inspect_only
        self.workflow.builder.base_image_insecure = self.parent_registry_insecure