code: def _get_latest_output_artifact(self, component_name, output_key):
      metadata_config = metadata.sqlite_metadata_connection_config(
          self._metadata_path
      )
      with metadata.Metadata(metadata_config) as m:
          [exec_type_name] = [
              exec_type.name
              for exec_type in m.store.get_execution_types()
              if component_name in exec_type.name
          ]
          executions = m.store.get_executions_by_type(exec_type_name)
          events = m.store.get_events_by_execution_ids(
              [e.id for e in executions]
          )
          output_artifact_ids = [
              event.artifact_id
              for event in events
              if event.type in _OUTPUT_EVENT_TYPES
          ]
          output_artifacts = m.store.get_artifacts_by_id(
              output_artifact_ids
          )
          self.assertNotEmpty(output_artifacts)
          return max(
              output_artifacts, key=lambda a: a.create_time_since_epoch
          )
  
imports: import os
  import subprocess
  from absl.testing import parameterized
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.examples.penguin import penguin_pipeline_local_infraval
  from tfx.orchestration import metadata
  from tfx.orchestration.local.local_dag_runner import LocalDagRunner
  from tfx.utils import path_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 4 for calling the PenguinPipelineLocalInfravalEndToEndTest obj's underlying member method code with example usage: obj._get_latest_output_artifact(component_name, output_key) and returns: max