class_docstr: Class to manage a pool of backgrounded threaded jobs.
  
  Below, we assume that 'jobs' is a BackgroundJobManager instance.
  
  Usage summary (see the method docstrings for details):
  
    jobs.new(...) -> start a new job
    
    jobs() or jobs.status() -> print status summary of all jobs
  
    jobs[N] -> returns job number N.
  
    foo = jobs[N].result -> assign to variable foo the result of job N
  
    jobs[N].traceback() -> print the traceback of dead job N
  
    jobs.remove(N) -> remove (finished) job N
  
    jobs.flush() -> remove all finished jobs
    
  As a convenience feature, BackgroundJobManager instances provide the
  utility result and traceback methods which retrieve the corresponding
  information from the jobs list:
  
    jobs.result(N) <--> jobs[N].result
    jobs.traceback(N) <--> jobs[N].traceback()
  
  While this appears minor, it allows you to use tab completion
  interactively on the job manager instance.
docstr: Remove a finished (completed or dead) job.
docstr_tok: ["Remove","a","finished","(","completed","or","dead",")","job","."]
code: def remove(self, num):
      """Remove a finished (completed or dead) job."""
  
      try:
          job = self.all[num]
      except KeyError:
          error("Job #%s not found" % num)
      else:
          stat_code = job.stat_code
          if stat_code == self._s_running:
              error(
                  "Job #%s is still running, it can not be removed."
                  % num
              )
              return
          elif stat_code == self._s_completed:
              self.completed.remove(job)
          elif stat_code == self._s_dead:
              self.dead.remove(job)
  
imports: from __future__ import print_function
  import sys
  import threading
  from IPython import get_ipython
  from IPython.core.ultratb import AutoFormattedTB
  from logging import error
  from IPython.utils.py3compat import string_types
label_desc: Use image node_id 13 for calling the BackgroundJobManager obj's underlying member method code with example usage: obj.remove(num) without return types