class_docstr: Base class for plugins that distribute graphs to workflows
class_docstr_tok: ["Base","class","for","plugins","that","distribute","graphs","to","workflows"]
code: def run(self, graph, config, updatehash=False):
      import networkx as nx
  
      pyfiles = []
      dependencies = {}
      self._config = config
      nodes = list(nx.topological_sort(graph))
      logger.debug("Creating executable python files for each node")
      for idx, node in enumerate(nodes):
          pyfiles.append(
              create_pyscript(
                  node, updatehash=updatehash, store_exception=False
              )
          )
          dependencies[idx] = [
              nodes.index(prevnode)
              for prevnode in list(graph.predecessors(node))
          ]
      self._submit_graph(pyfiles, dependencies, nodes)
  
imports: import sys
  from copy import deepcopy
  from glob import glob
  import os
  import shutil
  from time import sleep, time
  from traceback import format_exception
  import numpy
  from ...None import logging
  from ...utils.misc import str2bool
  from ..engine.utils import topological_sort, load_resultfile
  from ..engine import MapNode
  from .tools import report_crash, report_nodes_not_run, create_pyscript
label_desc: Use image node_id 2 for calling the GraphPluginBase obj's underlying member method code with example usage: obj.run(graph, config, updatehash) without return types