class_docstr: Execute workflow with a distribution engine
  
  Combinations of ``proc_done`` and ``proc_pending``:
  
  +------------+---------------+--------------------------------+
  | proc_done  | proc_pending  | outcome                        |
  +============+===============+================================+
  | True       | False         | Process is finished            |
  +------------+---------------+--------------------------------+
  | True       | True          | Process is currently being run |
  +------------+---------------+--------------------------------+
  | False      | False         | Process is queued              |
  +------------+---------------+--------------------------------+
  | False      | True          | INVALID COMBINATION            |
  +------------+---------------+--------------------------------+
  
  Attributes
  ----------
  procs : :obj:`list`
      list (N) of underlying interface elements to be processed
  proc_done : :obj:`numpy.ndarray`
      a boolean numpy array (N,) signifying whether a process has been
      submitted for execution
  proc_pending : :obj:`numpy.ndarray`
      a boolean numpy array (N,) signifying whether a
      process is currently running.
  depidx : :obj:`numpy.matrix`
      a boolean matrix (NxN) storing the dependency structure across
      processes. Process dependencies are derived from each column.
class_docstr_tok: ["Execute","workflow","with","a","distribution","engine","Combinations","of","``","proc_done","``","and","``","proc_pending","``",":","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","proc_done","|","proc_pending","|","outcome","|","+============+===============+================================+","|","True","|","False","|","Process","is","finished","|","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","True","|","True","|","Process","is","currently","being","run","|","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","False","|","False","|","Process","is","queued","|","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","False","|","True","|","INVALID","COMBINATION","|","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","Attributes","--","--","--","--","--","procs",":",":","obj",":","`","list","`","list","(","N",")","of","underlying","interface","elements","to","be","processed","proc_done",":",":","obj",":","`","numpy.ndarray","`","a","boolean","numpy","array","(","N",",",")","signifying","whether","a","process","has","been","submitted","for","execution","proc_pending",":",":","obj",":","`","numpy.ndarray","`","a","boolean","numpy","array","(","N",",",")","signifying","whether","a","process","is","currently","running",".","depidx",":",":","obj",":","`","numpy.matrix","`","a","boolean","matrix","(","NxN",")","storing","the","dependency","structure","across","processes",".","Process","dependencies","are","derived","from","each","column","."]
code: def _clean_queue(self, jobid, graph, result=None):
      logger.debug("Clearing %d from queue", jobid)
  
      if self._status_callback:
          self._status_callback(self.procs[jobid], "exception")
      if result is None:
          result = {
              "result": None,
              "traceback": "\n".join(format_exception(*sys.exc_info())),
          }
  
      crashfile = self._report_crash(self.procs[jobid], result=result)
      if str2bool(self._config["execution"]["stop_on_first_crash"]):
          raise RuntimeError("".join(result["traceback"]))
      if jobid in self.mapnodesubids:
          # remove current jobid
          self.proc_pending[jobid] = False
          self.proc_done[jobid] = True
          # remove parent mapnode
          jobid = self.mapnodesubids[jobid]
          self.proc_pending[jobid] = False
          self.proc_done[jobid] = True
      # remove dependencies from queue
      return self._remove_node_deps(jobid, crashfile, graph)
  
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 9 for calling the DistributedPluginBase obj's underlying member method code with example usage: obj._clean_queue(jobid, graph, result) and returns: self