class_docstr: Submits jobs to SLURM, can check on their status, and kill jobs.
  
  Uses ``drmaa`` Python library.
  
  Args:
      submit_options (str): command line options such as queue ``-q``,
           all written in one string.
      environment (str): the path to a file that contains environment
          variables; will be sourced before job is run.
      output_dir (str): path to directory in which ``stdout`` and ``stderr``
          will be written to. If not specified this will use the same as
          defined for the study.
class_docstr_tok: ["Submits","jobs","to","SLURM",",","can","check","on","their","status",",","and","kill","jobs",".","Uses","``","drmaa","``","Python","library",".","Args",":","submit_options","(","str",")",":","command","line","options","such","as","queue","``","-q","``",",","all","written","in","one","string",".","environment","(","str",")",":","the","path","to","a","file","that","contains","environment","variables",";","will","be","sourced","before","job","is","run",".","output_dir","(","str",")",":","path","to","directory","in","which","``","stdout","``","and","``","stderr","``","will","be","written","to",".","If","not","specified","this","will","use","the","same","as","defined","for","the","study","."]
docstr: Args:
      submit_command (str): e.g. "qsub -N myProject ..."
      run_command (str): e.g. "python nn.py"
  
  Returns:
      str: SLURM process ID.
docstr_tok: ["Args",":","submit_command","(","str",")",":","e.g",".","``","qsub","-N","myProject","...","''","run_command","(","str",")",":","e.g",".","``","python","nn.py","''","Returns",":","str",":","SLURM","process","ID","."]
code: def _submit_job(submit_command, run_command):
      """
      Args:
          submit_command (str): e.g. "qsub -N myProject ..."
          run_command (str): e.g. "python nn.py"
  
      Returns:
          str: SLURM process ID.
      """
      process = subprocess.Popen(
          submit_command,
          stdin=subprocess.PIPE,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
          shell=True,
          universal_newlines=True,
      )
      output, std_err = process.communicate(input=run_command)
      # output, std_err = process.communicate()
      process.stdin.close()
      output_regexp = r"Submitted batch job (\d+)"
      # Parse out the process id from text
      match = re.search(output_regexp, output)
      if match:
          return match.group(1)
      else:
          sys.stderr.write(output)
          return None
  
imports: import subprocess
  import re
  import sys
  import os
  import logging
label_desc: Use image node_id 3 for calling the SLURMScheduler obj's underlying member method code with example usage: obj._submit_job(submit_command, run_command) and returns: match, None