def get_jobs_by_status(status, job_id_filter=None, job_name_prefix=None):
    res = batch_client.list_jobs(jobQueue=queue_name, jobStatus=status, maxResults=10000)
    jobs = res['jobSummaryList']
    if job_name_prefix:
        jobs = [job for job in jobs if job['jobName'].startswith(job_name_prefix)]
    if job_id_filter:
        jobs = [job_def for job_def in jobs if (job_def['jobId'] in job_id_filter)]
    return jobs
def get_jobs_by_status(status, job_id_filter=None, job_name_prefix=None):
    res = batch_client.list_jobs(jobQueue=queue_name, jobStatus=status, maxResults=10000)
    jobs = res['jobSummaryList']
    if job_name_prefix:
        jobs = [job for job in jobs if job['jobName'].startswith(job_name_prefix)]
    if job_id_filter:
        jobs = [job_def for job_def in jobs if (job_def['jobId'] in job_id_filter)]
    return jobs