code: def testLatestPolicyModelOp_InputDictContainsAllKeys(self):
      model_blessing_1 = self.evaluator_bless_model(model=self.model_1)
      model_infra_blessing_1 = self.infra_validator_bless_model(
          model=self.model_1
      )
      model_blessing_2 = self.evaluator_bless_model(model=self.model_2)
  
      # Spurious blessings that will not be included in input_dict.
      model_infra_blessing_2 = self.infra_validator_bless_model(
          model=self.model_2
      )
      self.evaluator_bless_model(model=self.model_3)
      self.infra_validator_bless_model(model=self.model_3)
  
      actual = self._latest_policy_model(
          _LATEST_EVALUATOR_BLESSED,
          model=self.artifacts,
          model_blessing=[model_blessing_1],
          model_infra_blessing=[],
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_1],
              "model_blessing": [model_blessing_1],
          },
      )
  
      actual = self._latest_policy_model(
          _LATEST_EVALUATOR_BLESSED,
          model=self.artifacts,
          model_blessing=[model_blessing_1, model_blessing_2],
          model_infra_blessing=[],
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2],
          },
      )
  
      actual = self._latest_policy_model(
          _LATEST_EVALUATOR_BLESSED,
          model=self.artifacts,
          model_blessing=[model_blessing_1, model_blessing_2],
          model_infra_blessing=[model_infra_blessing_1],
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2],
          },
      )
  
      actual = self._latest_policy_model(
          _LATEST_BLESSED,
          model=self.artifacts,
          model_blessing=[model_blessing_1, model_blessing_2],
          model_infra_blessing=[
              model_infra_blessing_1,
              model_infra_blessing_2,
          ],
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2],
              "model_infra_blessing": [model_infra_blessing_2],
          },
      )
  
      actual = self._latest_policy_model(
          _LATEST_BLESSED,
          model=[self.model_1, self.model_3],
          model_blessing=[model_blessing_1, model_blessing_2],
          model_infra_blessing=[
              model_infra_blessing_1,
              model_infra_blessing_2,
          ],
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_1],
              "model_blessing": [model_blessing_1],
              "model_infra_blessing": [model_infra_blessing_1],
          },
      )
  
imports: from typing import Dict, List, Optional
  from absl.testing import parameterized
  import tensorflow
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import latest_policy_model_op
  from tfx.dsl.input_resolution.ops import ops
  from tfx.dsl.input_resolution.ops import test_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 13 for calling the LatestPolicyModelOpTest obj's underlying member method code with example usage: obj.testLatestPolicyModelOp_InputDictContainsAllKeys() without return types