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 _get_result(self, taskid):
      if taskid not in self._pending:
          raise Exception("Task %d not found" % taskid)
      if self._is_pending(taskid):
          return None
      node_dir = self._pending[taskid]
  
      glob(os.path.join(node_dir, "result_*.pklz")).pop()
  
      results_file = glob(os.path.join(node_dir, "result_*.pklz"))[0]
      result_data = load_resultfile(results_file)
      result_out = dict(result=None, traceback=None)
  
      if isinstance(result_data, dict):
          result_out["result"] = result_data["result"]
          result_out["traceback"] = result_data["traceback"]
          result_out["hostname"] = result_data["hostname"]
          if results_file:
              crash_file = os.path.join(node_dir, "crashstore.pklz")
              os.rename(results_file, crash_file)
      else:
          result_out["result"] = result_data
  
      return result_out
  
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 5 for calling the GraphPluginBase obj's underlying member method code with example usage: obj._get_result(taskid) and returns: result_out, None