class_docstr: Execute using LSF Cluster Submission
  
  The plugin_args input to run can be used to control the LSF execution.
  Currently supported options are:
  
  - template : template to use for batch job submission
  - bsub_args : arguments to be prepended to the job execution script in the
                bsub call
docstr: LSF lists a status of 'PEND' when a job has been submitted but is
  waiting to be picked up, and 'RUN' when it is actively being processed.
  But _is_pending should return True until a job has finished and is
  ready to be checked for completeness. So return True if status is
  either 'PEND' or 'RUN'
docstr_tok: ["LSF","lists","a","status","of","'PEND","'","when","a","job","has","been","submitted","but","is","waiting","to","be","picked","up",",","and","'RUN","'","when","it","is","actively","being","processed",".","But","_is_pending","should","return","True","until","a","job","has","finished","and","is","ready","to","be","checked","for","completeness",".","So","return","True","if","status","is","either","'PEND","'","or","'RUN","'"]
code: def _is_pending(self, taskid):
      """LSF lists a status of 'PEND' when a job has been submitted but is
      waiting to be picked up, and 'RUN' when it is actively being processed.
      But _is_pending should return True until a job has finished and is
      ready to be checked for completeness. So return True if status is
      either 'PEND' or 'RUN'"""
      cmd = CommandLine(
          "bjobs", resource_monitor=False, terminal_output="allatonce"
      )
      cmd.inputs.args = "%d" % taskid
      # check lsf task
      oldlevel = iflogger.level
      iflogger.setLevel(logging.getLevelName("CRITICAL"))
      result = cmd.run(ignore_exception=True)
      iflogger.setLevel(oldlevel)
      # logger.debug(result.runtime.stdout)
      if (
          "DONE" in result.runtime.stdout
          or "EXIT" in result.runtime.stdout
      ):
          return False
      else:
          return True
  
file_path: nipype/nipype/pipeline/plugins/lsf.py
imports: import os
  import re
  from time import sleep
  from ...None import logging
  from ...interfaces.base import CommandLine
  from .base import SGELikeBatchManagerBase, logger
label_desc: Use image node_id 2 for calling the LSFPlugin obj's underlying member method code with example usage: obj._is_pending(taskid) and returns: False, True