class_docstr: Kubeflow pipelines task builder.
  
  Constructs a pipeline task spec based on the TFX node information. Meanwhile,
  augments the deployment config associated with the node.
docstr: Builds two resolver specs to resolve the latest blessed model.
docstr_tok: ["Builds","two","resolver","specs","to","resolve","the","latest","blessed","model","."]
code: def _build_latest_blessed_model_resolver(
      self,
  ) -> Dict[str, pipeline_pb2.PipelineTaskSpec]:
      """Builds two resolver specs to resolve the latest blessed model."""
      # The two phased resolution logic will be mapped to the following:
      # 1. A ResolverSpec to get the latest ModelBlessing artifact under the
      #    current context, with a valid current_model_id custom property
      #    attached; and
      # 2. A ResolverSpec to get the latest Model artifact under the current
      #    context, where the unique name of the artifact is corresponding to
      #    the current_model_id field in step 1.
      #
      # Such conversion will generate two PipelineTaskSpec:
      # 1. A TaskSpec with the name '{component_id}-model-blessing-resolver',
      #    where component_id is the original node id from the DSL resolver node.
      #    This TaskSpec has no input artifact but one output artifacts,
      #    which is the latest valid ModelBlessing artifact it
      #    finds.
      # 2. A TaskSpec with the name '{component_id}-model-resolver'. This TaskSpec
      #    has one input artifact connected to the 'model_blessing' output of
      #    '{component_id}-model-blessing-resolver', representing the latest
      #    blessed model it finds in MLMD under the same context.
      assert len(self._inputs) == 2, "Expecting 2 input Channels"
  
      model_channel_key, model_blessing_channel_key = None, None
      # Find the output key for ModelBlessing and Model, respectively
      for name, c in self._inputs.items():
          if issubclass(c.type, standard_artifacts.ModelBlessing):
              model_blessing_channel_key = name
          elif issubclass(c.type, standard_artifacts.Model):
              model_channel_key = name
  
      assert model_channel_key is not None, "Expecting Model as input"
      assert model_blessing_channel_key is not None, (
          "Expecting ModelBlessing as" " input"
      )
  
      model_blessing_resolver = (
          self._build_resolver_for_latest_model_blessing(
              model_blessing_channel_key
          )
      )
  
      model_resolver = self._build_resolver_for_latest_blessed_model(
          model_channel_key=model_channel_key,
          model_blessing_resolver_name=model_blessing_resolver.task_info.name,
          model_blessing_channel_key=model_blessing_channel_key,
      )
  
      # 5. Modify the channel_redirect_map passed in.
      self._channel_redirect_map[(self._node.id, model_channel_key)] = (
          model_resolver.task_info.name,
          model_channel_key,
      )
      self._channel_redirect_map[
          (self._node.id, model_blessing_channel_key)
      ] = (
          model_blessing_resolver.task_info.name,
          model_blessing_channel_key,
      )
  
      return {
          model_blessing_resolver.task_info.name: model_blessing_resolver,
          model_resolver.task_info.name: model_resolver,
      }
  
imports: import itertools
  from typing import Any, Dict, List, Optional, Tuple, cast
  from absl import logging
  from kfp.pipeline_spec import pipeline_spec_pb2
  from tfx import components
  from tfx.components.evaluator import constants
  from tfx.dsl.compiler import compiler_utils
  from tfx.dsl.component.experimental import executor_specs
  from tfx.dsl.component.experimental import placeholders
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_node
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.components.common import importer
  from tfx.dsl.components.common import resolver
  from tfx.dsl.context_managers import dsl_context_registry
  from tfx.dsl.experimental.conditionals import conditional
  from tfx.dsl.input_resolution.strategies import latest_artifact_strategy
  from tfx.dsl.input_resolution.strategies import latest_blessed_model_strategy
  from tfx.dsl.placeholder import placeholder
  from tfx.orchestration import data_types
  from tfx.orchestration.kubeflow import decorators
  from tfx.orchestration.kubeflow import utils
  from tfx.orchestration.kubeflow.v2 import compiler_utils
  from tfx.orchestration.kubeflow.v2 import parameter_utils
  from tfx.types import channel_utils
  from tfx.types import standard_artifacts
  from tfx.types.channel import Channel
  from tfx.utils import deprecation_utils
  from tfx.utils import name_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 9 for calling the StepBuilder obj's underlying member method code with example usage: obj._build_latest_blessed_model_resolver() and returns: dict