class_docstr: Dataclass that stores public execution context.
  
  This is the single public context class to access ExecutionInvocation and
  runtime information of a node execution. This contains similar fields from
  `ph.execution_invocation()` or `ph.runtime_info()`, but is meant to be used
  during the component execution, not from the pipeline authoring DSL.
  
  An ExecutionContext instance is typically dependency injected from the
  runtime, and should not be directly instantiated by the users.
class_docstr_tok: ["Dataclass","that","stores","public","execution","context",".","This","is","the","single","public","context","class","to","access","ExecutionInvocation","and","runtime","information","of","a","node","execution",".","This","contains","similar","fields","from","`","ph.execution_invocation","(",")","`","or","`","ph.runtime_info","(",")","`",",","but","is","meant","to","be","used","during","the","component","execution",",","not","from","the","pipeline","authoring","DSL",".","An","ExecutionContext","instance","is","typically","dependency","injected","from","the","runtime",",","and","should","not","be","directly","instantiated","by","the","users","."]
code: def __init__(
      self, exec_info: data_types.ExecutionInfo, **unused_kwargs
  ):
      del unused_kwargs
      self.execution_id = exec_info.execution_id
      self.stateful_working_dir = exec_info.stateful_working_dir
      self.tmp_dir = exec_info.tmp_dir
      self.node_id = (
          exec_info.pipeline_node.node_info.id
          if exec_info.pipeline_node is not None
          else None
      )
      self.pipeline_id = (
          exec_info.pipeline_info.id
          if exec_info.pipeline_info is not None
          else None
      )
      self.pipeline_run_id = exec_info.pipeline_run_id
      self.top_level_pipeline_run_id = (
          exec_info.top_level_pipeline_run_id
      )
      self.frontend_url = exec_info.frontend_url
  
imports: from typing import Optional
  import attr
  from tfx.orchestration.portable import data_types
label_desc: Use image node_id 1 to create a new ExecutionContext object  with example: obj = ExecutionContext(exec_info)