code: def publish_internal_execution(
      metadata_handle: metadata.Metadata,
      contexts: Sequence[metadata_store_pb2.Context],
      execution_id: int,
      output_artifacts: Optional[typing_utils.ArtifactMultiMap] = None,
  ) -> None:
      """Marks an exeisting execution as as success and links its output to an INTERNAL_OUTPUT event.
  
      Args:
        metadata_handle: A handler to access MLMD.
        contexts: MLMD contexts to associated with the execution.
        execution_id: The id of the execution.
        output_artifacts: Output artifacts of the execution. Each artifact will be
          linked with the execution through an event with type INTERNAL_OUTPUT.
      """
      [execution] = metadata_handle.store.get_executions_by_id(
          [execution_id]
      )
      execution.last_known_state = metadata_store_pb2.Execution.COMPLETE
  
      execution_lib.put_execution(
          metadata_handle,
          execution,
          contexts,
          output_artifacts=output_artifacts,
          output_event_type=metadata_store_pb2.Event.INTERNAL_OUTPUT,
      )
  
file_path: tfx/tfx/orchestration/portable/execution_publish_utils.py
imports: from typing import Mapping, Optional, Sequence
  import uuid
  from tfx import types
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import merge_utils
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.utils import typing_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: publish_internal_execution(metadata_handle, contexts, execution_id, output_artifacts) without return types