code: def build_and_submit_jobs(root_dir, jobs, sgeargs=None):
      
      # If the passed set of jobs is not a list, turn it into one. This makes the
      # use of a single JobGroup a little more intutitive
      if not isinstance(jobs, list):
          jobs = [jobs]
  
      # Build and submit the passed jobs
      build_directories(root_dir)        # build all necessary directories
      build_job_scripts(root_dir, jobs)  # build job scripts
      submit_jobs(root_dir, jobs, sgeargs)
docs: Submits the passed iterable of Job objects to SGE, placing SGE's
      output in the passed root directory
  
      - root_dir   Root directory for SGE and job output
      - jobs       List of Job objects, describing each job to be submitted
      - sgeargs    Additional arguments to qsub