code: def testLatestPolicyModelOpTest_ValidateInputDict(self):
      with self.assertRaises(exceptions.InvalidArgument):
          # "model" key is missing.
          input_dict = {"model_blessing": [self.model_1]}
          latest_policy_model_op._validate_input_dict(input_dict)
  
          # Invalid key "foo".
          input_dict = {"model": [self.model_1], "foo": [self.model_1]}
          latest_policy_model_op._validate_input_dict(input_dict)
  
          # Incorrect artifact type for "model_infra_blessing".
          input_dict = {
              "model": [self.model_1],
              "model_infra_blessing": [self.model_1],
          }
          latest_policy_model_op._validate_input_dict(input_dict)
  
          # E2E call results in InvalidArgument.
          self._latest_policy_model(
              _LATEST_EVALUATOR_BLESSED,
              model=[self.model_1],
              model_blessing=[self.model_1],
          )
  
      model_infra_blessing = self.infra_validator_bless_model(
          self.model_1
      )
      model_blessing = self.evaluator_bless_model(self.model_1)
  
      # Should not raise any exception.
      input_dict = {
          "model": [self.model_1],
          "model_blessing": [model_blessing],
          "model_infra_blessing": [model_infra_blessing],
      }
      latest_policy_model_op._validate_input_dict(input_dict)
  
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 7 for calling the LatestPolicyModelOpTest obj's underlying member method code with example usage: obj.testLatestPolicyModelOpTest_ValidateInputDict() without return types