code: def kill_all(job_queue, reason='None given', states=None):
      
      if states is None:
          states = ['STARTING', 'RUNNABLE', 'RUNNING']
      batch = boto3.client('batch')
      runnable = batch.list_jobs(jobQueue=job_queue, jobStatus='RUNNABLE')
      job_info = runnable.get('jobSummaryList')
      if job_info:
          job_ids = [job['jobId'] for job in job_info]
          # Cancel jobs
          for job_id in job_ids:
              batch.cancel_job(jobId=job_id, reason=reason)
      res_list = []
      for status in states:
          running = batch.list_jobs(jobQueue=job_queue, jobStatus=status)
          job_info = running.get('jobSummaryList')
          if job_info:
              job_ids = [job['jobId'] for job in job_info]
              for job_id in job_ids:
                  logger.info('Killing %s' % job_id)
                  res = batch.terminate_job(jobId=job_id, reason=reason)
                  res_list.append(res)
      return res_list
docs: Terminates/cancels all RUNNING, RUNNABLE, and STARTING jobs.