class_docstr: LatestBlessedModelStrategy resolves the latest blessed Model artifact.
  
  Note that this ResolverStrategy is experimental and is subject to change in
  terms of both interface and implementation.
  
  Don't construct LatestBlessedModelStrategy directly, example usage:
  ```
    model_resolver = Resolver(
        strategy_class=LatestBlessedModelStrategy,
        model=Channel(type=Model),
        model_blessing=Channel(type=ModelBlessing),
    ).with_id('latest_blessed_model_resolver')
    model_resolver.outputs['model']
  ```
docstr: Resolves artifacts from channels by querying MLMD.
  
  Args:
    store: An MLMD MetadataStore object.
    input_dict: The input_dict to resolve from.
  
  Returns:
    The latest blessed Model and its corresponding ModelBlessing, respectively
    in the same input channel they were contained to.
  
  Raises:
    RuntimeError: if input_dict contains unsupported artifact types.
code: def resolve_artifacts(
      self,
      store: mlmd.MetadataStore,
      input_dict: Dict[str, List[types.Artifact]],
  ) -> Optional[Dict[str, List[types.Artifact]]]:
      """Resolves artifacts from channels by querying MLMD.
  
      Args:
        store: An MLMD MetadataStore object.
        input_dict: The input_dict to resolve from.
  
      Returns:
        The latest blessed Model and its corresponding ModelBlessing, respectively
        in the same input channel they were contained to.
  
      Raises:
        RuntimeError: if input_dict contains unsupported artifact types.
      """
      model_channel_key = None
      model_blessing_channel_key = None
      assert len(input_dict) == 2, "Expecting 2 input Channels"
      for k, artifact_list in input_dict.items():
          if not artifact_list:
              # If model or model blessing channel has no artifacts, the min_count
              # can not be met, short cut to return empty dict here.
              return {key: [] for key in input_dict}
          artifact = artifact_list[0]
          if issubclass(type(artifact), standard_artifacts.Model):
              model_channel_key = k
          elif issubclass(
              type(artifact), standard_artifacts.ModelBlessing
          ):
              model_blessing_channel_key = k
          else:
              raise RuntimeError(
                  "Only expecting Model or ModelBlessing, got %s"
                  % artifact.TYPE_NAME
              )
      assert model_channel_key is not None, "Expecting Model as input"
      assert model_blessing_channel_key is not None, (
          "Expecting ModelBlessing as" " input"
      )
  
      result = self._resolve(
          input_dict, model_channel_key, model_blessing_channel_key
      )
      return result
  
file_path: tfx/tfx/dsl/input_resolution/strategies/latest_blessed_model_strategy.py
imports: from typing import Dict, List, Optional
  from tfx import types
  from tfx.dsl.components.common import resolver
  from tfx.types import standard_artifacts
  from tfx.utils import doc_controls
  import ml_metadata
label_desc: Use image node_id 2 for calling the LatestBlessedModelStrategy obj's underlying member method code with example usage: obj.resolve_artifacts(store, input_dict) and returns: result, unknown