class_docstr: Abstract class for integration testing concrete Metadata implementations.
  
  Subclasses should override metadata() to return an instance of Metadata that
  has not been entered.
class_docstr_tok: ["Abstract","class","for","integration","testing","concrete","Metadata","implementations",".","Subclasses","should","override","metadata","(",")","to","return","an","instance","of","Metadata","that","has","not","been","entered","."]
code: def testGetQualifiedArtifacts(self):
      with self.metadata() as m:
          contexts_one = m.register_pipeline_contexts_if_not_exists(
              self._pipeline_info
          )
          contexts_two = m.register_pipeline_contexts_if_not_exists(
              self._pipeline_info3
          )
          # The first execution, with matched:
          #   - pipeline context
          #   - producer component id
          m.register_execution(
              exec_properties={},
              pipeline_info=self._pipeline_info,
              component_info=self._component_info,
              contexts=list(contexts_one),
          )
          # artifact_one will be output with matched artifact type and output key
          artifact_one = standard_artifacts.Model()
          # artifact_one will be output with matched artifact type only
          artifact_two = standard_artifacts.Model()
          m.publish_execution(
              component_info=self._component_info,
              output_artifacts={
                  "k1": [artifact_one],
                  "k2": [artifact_two],
              },
          )
          # The second execution, with matched pipeline context only
          m.register_execution(
              exec_properties={},
              pipeline_info=self._pipeline_info,
              component_info=self._component_info2,
              contexts=list(contexts_one),
          )
          # artifact_three will be output with matched artifact type and output key
          artifact_three = standard_artifacts.Model()
          m.publish_execution(
              component_info=self._component_info2,
              output_artifacts={"k1": [artifact_three]},
          )
          # The third execution, with matched producer component id only
          m.register_execution(
              exec_properties={},
              pipeline_info=self._pipeline_info3,
              component_info=self._component_info3,
              contexts=list(contexts_two),
          )
          # artifact_three will be output with matched artifact type and output key
          artifact_four = standard_artifacts.Model()
          m.publish_execution(
              component_info=self._component_info3,
              output_artifacts={"k1": [artifact_four]},
          )
  
          result = m.get_qualified_artifacts(
              contexts=contexts_one,
              type_name=standard_artifacts.Model().type_name,
              producer_component_id=self._component_info.component_id,
              output_key="k1",
          )
          self.assertLen(result, 1)
          self.assertEqual(result[0].id, artifact_one.id)
  
imports: from typing import Mapping
  import tensorflow
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types.artifact import ArtifactState
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 17 for calling the MetadataTest obj's underlying member method code with example usage: obj.testGetQualifiedArtifacts() without return types