class_docstr: A helper class to compute and plot lineage of ml-metadata artifacts.
class_docstr_tok: ["A","helper","class","to","compute","and","plot","lineage","of","ml-metadata","artifacts","."]
docstr: Returns a tuple of most recent execution id and whether it is cached run.
  
  Args:
    artifact_id: The artifact used to retrieve the upstream executions.
docstr_tok: ["Returns","a","tuple","of","most","recent","execution","id","and","whether","it","is","cached","run",".","Args",":","artifact_id",":","The","artifact","used","to","retrieve","the","upstream","executions","."]
code: def _get_upstream_execution_ids(self, artifact_id):
      """Returns a tuple of most recent execution id and whether it is cached run.
  
      Args:
        artifact_id: The artifact used to retrieve the upstream executions.
      """
      events = self.metadata_store.get_events_by_artifact_ids(
          [artifact_id]
      )
      # skip other executions from caching.
      execution_ids = [
          e.execution_id for e in events if _is_output_event(e)
      ]
      num_parents = len(execution_ids)
      return (
          []
          if num_parents < 1
          else [(max(execution_ids), num_parents > 1)]
      )
  
imports: import re
  from IPython.display import display_html
  import matplotlib.pyplot
  import networkx
  import pandas
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the _LineageGraphHelper obj's underlying member method code with example usage: obj._get_upstream_execution_ids(artifact_id) and returns: unknown