code: def set_execution_result_if_not_empty(
      executor_output: Optional[execution_result_pb2.ExecutorOutput],
      execution: metadata_store_pb2.Execution,
  ) -> None:
      """Sets execution result as a custom property of the execution."""
      if executor_output and (
          executor_output.execution_result.result_message
          or executor_output.execution_result.metadata_details
          or executor_output.execution_result.code
      ):
          execution_lib.set_execution_result(
              executor_output.execution_result, execution
          )
  
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 2 for calling a global function with example usage: set_execution_result_if_not_empty(executor_output, execution) without return types