code: def get_execution_result(
      execution: metadata_store_pb2.Execution, ignore_parse_errors=False
  ) -> Optional[execution_result_pb2.ExecutionResult]:
      """Gets execution result stored as custom property of execution if it exists.
  
      The custom property should have been set using `set_execution_result`. If
      ignore_parse_errors=True, JSON parsing errors will lead to returning `None`.
  
      Args:
        execution: The execution from which to read execution result.
        ignore_parse_errors: If True, JSON parsing errors are ignored and a None is
          returned.
  
      Returns:
        An `ExecutionResult` object if one exists.
      """
      value = execution.custom_properties.get(_EXECUTION_RESULT)
      if not value:
          return None
      execution_result = execution_result_pb2.ExecutionResult()
      try:
          json_format.Parse(value.string_value, execution_result)
      except json_format.ParseError:
          logging.exception(
              "Error parsing json object, %s",
              "ignoring" if ignore_parse_errors else "re-raising",
          )
          if ignore_parse_errors:
              return None
          raise
      return execution_result
  
imports: from __future__ import annotations
  import collections
  import copy
  import itertools
  import re
  from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple
  from absl import logging
  from tfx import types
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable.mlmd import artifact_lib
  from tfx.orchestration.portable.mlmd import common_utils
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.orchestration.portable.mlmd import filter_query_builder
  from tfx.utils import metrics_utils
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import proto_utils
  from tfx.utils import typing_utils
  from tfx.utils import telemetry_utils
  from google.protobuf import json_format
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 26 for calling a global function with example usage: get_execution_result(execution, ignore_parse_errors) and returns: execution_result, None, None