class_docstr: MLMD mixins for testing ResolverOps and resolver functions.
class_docstr_tok: ["MLMD","mixins","for","testing","ResolverOps","and","resolver","functions","."]
docstr: Add an Execution to MLMD where the InfraValidator blesses the model.
code: def infra_validator_bless_model(
      self,
      model: types.Artifact,
      blessed: bool = True,
      contexts: Sequence[metadata_store_pb2.Context] = (),
  ) -> types.Artifact:
      """Add an Execution to MLMD where the InfraValidator blesses the model."""
      if blessed:
          custom_properties = {"blessing_status": "INFRA_BLESSED"}
      else:
          custom_properties = {"blessing_status": "INFRA_NOT_BLESSED"}
      model_infra_blessing = self.prepare_tfx_artifact(
          ModelInfraBlessing, custom_properties=custom_properties
      )
  
      self.put_execution(
          "InfraValidator",
          inputs={"model": self.unwrap_tfx_artifacts([model])},
          outputs={
              "result": self.unwrap_tfx_artifacts(
                  [model_infra_blessing]
              )
          },
          contexts=contexts,
      )
  
      return model_infra_blessing
  
imports: from typing import Type, Any, Dict, List, Optional, Sequence, Tuple, Union, Mapping
  from unittest import mock
  from absl.testing import parameterized
  from tfx import types
  from tfx.dsl.compiler import compiler_context
  from tfx.dsl.compiler import node_inputs_compiler
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import channel
  from tfx.types import component_spec
  from tfx.utils import test_case_utils
  from tfx.utils import typing_utils
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 8 for calling the ResolverTestCase obj's underlying member method code with example usage: obj.infra_validator_bless_model(model, blessed, contexts) and returns: model_infra_blessing