<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_job_log(job_info, log_group_name='/aws/batch/job', write_file=True, verbose=False):
 """Gets the Cloudwatch log associated with the given job. Parameters job_info : dict dict containing entries for 'jobName' and 'jobId', e.g., as returned by get_jobs() log_group_name : string Name of the log group; defaults to '/aws/batch/job' write_file : boolean If True, writes the downloaded log to a text file with the filename '%s_%s.log' % (job_name, job_id) Returns ------- list of strings The event messages in the log, with the earliest events listed first. """

    job_name = job_info['jobName']
    job_id = job_info['jobId']
    logs = boto3.client('logs')
    batch = boto3.client('batch')
    resp = batch.describe_jobs(jobs=[job_id])
    job_desc = resp['jobs'][0]
    job_def_name = job_desc['jobDefinition'].split('/')[-1].split(':')[0]
    task_arn_id = job_desc['container']['taskArn'].split('/')[-1]
    log_stream_name = '%s/default/%s' % (job_def_name, task_arn_id)
    stream_resp = logs.describe_log_streams(
                            logGroupName=log_group_name,
                            logStreamNamePrefix=log_stream_name)
    streams = stream_resp.get('logStreams')
    if not streams:
        logger.warning('No streams for job')
        return None
    elif len(streams) > 1:
        logger.warning('More than 1 stream for job, returning first')
    log_stream_name = streams[0]['logStreamName']
    if verbose:
        logger.info("Getting log for %s/%s" % (job_name, job_id))
    out_file = ('%s_%s.log' % (job_name, job_id)) if write_file else None
    lines = get_log_by_name(log_group_name, log_stream_name, out_file, verbose)
    return lines