'Create a DRMAA job template, populate with specified properties,
run the job, and return the external_job_id.'

def run_job(self, **kwds):

    template = self.session.createJobTemplate()
    try:
        for key in kwds:
            setattr(template, key, kwds[key])
        return self.session.runJob(template)
    finally:
        self.session.deleteJobTemplate(template)
