code: def testLatestPolicyModelOp_MultipleModelInputEventsSameExecutionId(
      self,
  ):
      model_blessing_2_1 = self.evaluator_bless_model(
          model=self.model_2, baseline_model=self.model_1
      )
      actual = self._latest_policy_model(_LATEST_EVALUATOR_BLESSED)
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2_1],
          },
      )
  
      # Bless Model 2 again, using the same baseline Model 1 as before.
      model_blessing_2_2 = self.evaluator_bless_model(
          model=self.model_2, baseline_model=self.model_1
      )
      actual = self._latest_policy_model(
          _LATEST_EVALUATOR_BLESSED, model=[self.model_2, self.model_3]
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2_2],
          },
      )
  
      # Model 2 should be returned as the latest blessed model, even though
      # there exists an Event between Model 3 and a ModelBlessing. In practice
      # however, the baseline_model will be created earlier than the model.
      model_blessing_2_3 = self.evaluator_bless_model(
          model=self.model_2, baseline_model=self.model_3
      )
      actual = self._latest_policy_model(_LATEST_EVALUATOR_BLESSED)
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2_3],
          },
      )
  
      model_blessing_3 = self.evaluator_bless_model(
          model=self.model_3, baseline_model=self.model_2
      )
      actual = self._latest_policy_model(_LATEST_EVALUATOR_BLESSED)
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_3],
              "model_blessing": [model_blessing_3],
          },
      )
  
      # When we restrict the artifacts to just [Model 1, Model 2], then Model 2
      # should be returned.
      actual = self._latest_policy_model(
          _LATEST_EVALUATOR_BLESSED, model=[self.model_1, self.model_2]
      )
      self.assertArtifactMapsEqual(
          actual,
          {
              "model": [self.model_2],
              "model_blessing": [model_blessing_2_3],
          },
      )
  
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 12 for calling the LatestPolicyModelOpTest obj's underlying member method code with example usage: obj.testLatestPolicyModelOp_MultipleModelInputEventsSameExecutionId() without return types