class_docstr: Abstract class for integration testing concrete Metadata implementations.
  
  Subclasses should override metadata() to return an instance of Metadata that
  has not been entered.
class_docstr_tok: ["Abstract","class","for","integration","testing","concrete","Metadata","implementations",".","Subclasses","should","override","metadata","(",")","to","return","an","instance","of","Metadata","that","has","not","been","entered","."]
docstr: Returns a mapping from component id to execution state.
docstr_tok: ["Returns","a","mapping","from","component","id","to","execution","state","."]
code: def _get_execution_states(
      self,
      metadata_handle: metadata.Metadata,
      pipeline_info: data_types.PipelineInfo,
  ) -> Mapping[str, str]:
      """Returns a mapping from component id to execution state."""
      pipeline_run_context = metadata_handle.store.get_context_by_type_and_name(
          metadata._CONTEXT_TYPE_PIPELINE_RUN,  # pylint: disable=protected-access
          pipeline_info.pipeline_run_context_name,
      )
      result = {}
      if not pipeline_run_context:
          return result
      for execution in metadata_handle.store.get_executions_by_context(
          pipeline_run_context.id
      ):
          result[
              execution.properties["component_id"].string_value
          ] = execution.properties["state"].string_value
      return result
  
imports: from typing import Mapping
  import tensorflow
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types.artifact import ArtifactState
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 3 for calling the MetadataTest obj's underlying member method code with example usage: obj._get_execution_states(metadata_handle, pipeline_info) and returns: result, result