class_docstr: Execute using SLURM
  
  The plugin_args input to run can be used to control the SLURM execution.
  Currently supported options are:
  
  - template : template to use for batch job submission
  
  - sbatch_args: arguments to pass prepend to the sbatch call
code: def __init__(self, **kwargs):
      template = "#!/bin/bash"
  
      self._retry_timeout = 2
      self._max_tries = 2
      self._template = template
      self._sbatch_args = None
      self._jobid_re = "Submitted batch job ([0-9]*)"
  
      if "plugin_args" in kwargs and kwargs["plugin_args"]:
          if "retry_timeout" in kwargs["plugin_args"]:
              self._retry_timeout = kwargs["plugin_args"][
                  "retry_timeout"
              ]
          if "max_tries" in kwargs["plugin_args"]:
              self._max_tries = kwargs["plugin_args"]["max_tries"]
          if "jobid_re" in kwargs["plugin_args"]:
              self._jobid_re = kwargs["plugin_args"]["jobid_re"]
          if "template" in kwargs["plugin_args"]:
              self._template = kwargs["plugin_args"]["template"]
              if os.path.isfile(self._template):
                  with open(self._template) as f:
                      self._template = f.read()
          if "sbatch_args" in kwargs["plugin_args"]:
              self._sbatch_args = kwargs["plugin_args"]["sbatch_args"]
      self._pending = {}
      super().__init__(self._template, **kwargs)
  
file_path: nipype/nipype/pipeline/plugins/slurm.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 1 to create a new SLURMPlugin object from inherited base classes: SGELikeBatchManagerBase with example: obj = SLURMPlugin()