class_docstr: Execute using OAR
  
  The plugin_args input to run can be used to control the OAR execution.
  Currently supported options are:
  
  - template : template to use for batch job submission
  - oarsub_args : arguments to be prepended to the job execution
                  script in the oarsub call
  - max_jobname_len: maximum length of the job name.  Default 15.
class_docstr_tok: ["Execute","using","OAR","The","plugin_args","input","to","run","can","be","used","to","control","the","OAR","execution",".","Currently","supported","options","are",":","-","template",":","template","to","use","for","batch","job","submission","-","oarsub_args",":","arguments","to","be","prepended","to","the","job","execution","script","in","the","oarsub","call","-","max_jobname_len",":","maximum","length","of","the","job","name",".","Default","15","."]
code: def _is_pending(self, taskid):
      #  subprocess.Popen requires taskid to be a string
      proc = subprocess.Popen(
          ["oarstat", "-J", "-s", "-j", taskid],
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
      )
      o, e = proc.communicate()
      parsed_result = json.loads(o)[taskid].lower()
      is_pending = ("error" not in parsed_result) and (
          "terminated" not in parsed_result
      )
      return is_pending
  
file_path: nipype/nipype/pipeline/plugins/oar.py
imports: import os
  import stat
  from time import sleep
  import subprocess
  import simplejson
  from ...None import logging
  from ...interfaces.base import CommandLine
  from .base import SGELikeBatchManagerBase, logger
label_desc: Use image node_id 2 for calling the OARPlugin obj's underlying member method code with example usage: obj._is_pending(taskid) and returns: is_pending