class_docstr: Generator implementation class for SyncPipelineTaskGenerator.
class_docstr_tok: ["Generator","implementation","class","for","SyncPipelineTaskGenerator","."]
docstr: Generates tasks for a node from its existing execution.
code: def _generate_tasks_from_existing_execution(
      self,
      execution: metadata_store_pb2.Execution,
      node: node_proto_view.NodeProtoView,
  ) -> List[task_lib.Task]:
      """Generates tasks for a node from its existing execution."""
      logging.info(
          "Generating tasks from existing execution for node: %s",
          node.node_info.id,
      )
      tasks = []
      node_uid = task_lib.NodeUid.from_node(self._pipeline, node)
      with mlmd_state.mlmd_execution_atomic_op(
          mlmd_handle=self._mlmd_handle, execution_id=execution.id
      ) as e:
          e.last_known_state = metadata_store_pb2.Execution.RUNNING
  
      tasks.append(
          task_lib.UpdateNodeStateTask(
              node_uid=node_uid, state=pstate.NodeState.RUNNING
          )
      )
      tasks.append(
          task_gen_utils.generate_task_from_execution(
              self._mlmd_handle, self._pipeline, node, e
          )
      )
      return tasks
  
imports: import collections
  import textwrap
  from typing import Callable, Dict, List, Mapping, Optional, Set
  from absl import logging
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import mlmd_state
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import service_jobs
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_gen
  from tfx.orchestration.experimental.core import task_gen_utils
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
  from tfx.utils import topsort
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 6 for calling the _Generator obj's underlying member method code with example usage: obj._generate_tasks_from_existing_execution(execution, node) and returns: tasks