class_docstr: Stores child ModelBlessing, ModelInfraBlessing, ModelPush for a Model.
class_docstr_tok: ["Stores","child","ModelBlessing",",","ModelInfraBlessing",",","ModelPush","for","a","Model","."]
docstr: Checks if ModelRelations contains artifacts that meet the Policy.
docstr_tok: ["Checks","if","ModelRelations","contains","artifacts","that","meet","the","Policy","."]
code: def meets_policy(self, policy: Policy) -> bool:
      """Checks if ModelRelations contains artifacts that meet the Policy."""
      if policy == Policy.LATEST_EXPORTED:
          return True
      elif policy == Policy.LATEST_PUSHED:
          return bool(self.model_push_by_artifact_id)
      elif policy == Policy.LATEST_EVALUATOR_BLESSED:
          return bool(self.model_blessing_by_artifact_id)
      elif policy == Policy.LATEST_INFRA_VALIDATOR_BLESSED:
          return bool(self.infra_blessing_by_artifact_id)
      elif policy == Policy.LATEST_BLESSED:
          return bool(self.model_blessing_by_artifact_id) and bool(
              self.infra_blessing_by_artifact_id
          )
  
      return False
  
imports: import collections
  import enum
  from typing import Dict
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.orchestration.portable.mlmd import filter_query_builder
  from tfx.types import artifact_utils
  from tfx.utils import typing_utils
  from ml_metadata.proto import metadata_store_pb2
  from ml_metadata.tools.mlmd_resolver import metadata_resolver
label_desc: Use image node_id 2 for calling the ModelRelations obj's underlying member method code with example usage: obj.meets_policy(policy) and returns: False, True, bool, bool, bool, unknown