def normalize_job_id(job_id):
    """Convert the job id into job_id, array_id."""
    job_id = job_id.split('.')[0]
    if '[' in job_id:
        job_id, array_id = job_id.split('[')
        job_id = job_id.strip('[]')
        array_id = array_id.strip('[]')
        if not array_id:
            array_id = None
    else:
        array_id = None
    return job_id, array_id