def METHOD_NAME(line):
    if sacct_line_regex(line) is None:
        return
    job_id, job_name, resources, elapsed_raw, current_status, node, start_time = sacct_line_regex(line).groups()
    request = dict(e.split('=') for e in resources.split(','))
    start_time = datetime.strptime(start_time, '%Y-%m-%dT%H:%M:%S')
    elapsed = timedelta(seconds=int(elapsed_raw))
    return Job(job_id=job_id, name=job_name, req_memory=request['mem'], cpu=request['cpu'], gpu=request.get('gpu', '0'), current_status=current_status, node=node, start_time=start_time, time_elapsed=elapsed)