code: def _create_test_execution(state, properties, custom_properties):
      """Creates a test MLMD execution proto."""
      execution = metadata_store_pb2.Execution(
          id=1, type_id=1, last_known_state=state
      )
  
      def _set_property_values(execution_properties, properties_to_add):
          """Sets property fields for an execution proto."""
          for key, val in properties_to_add.items():
              value = metadata_store_pb2.Value()
              if isinstance(val, bool):
                  value.bool_value = val
                  execution_properties[key].CopyFrom(value)
              elif isinstance(val, str):
                  value.string_value = val
                  execution_properties[key].CopyFrom(value)
              elif isinstance(val, int):
                  value.int_value = val
                  execution_properties[key].CopyFrom(value)
              elif isinstance(val, float):
                  value.double_value = val
                  execution_properties[key].CopyFrom(value)
  
      _set_property_values(execution.properties, properties)
      _set_property_values(
          execution.custom_properties, custom_properties
      )
      return execution
  
imports: from concurrent import futures
  import os
  import threading
  import tensorflow
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.core import mlmd_state
  from tfx.orchestration.experimental.core import test_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _create_test_execution(state, properties, custom_properties) and returns: execution