import re


def parse_jobs_list(cli_output):
    """
    Parse Databricks CLI output of `databricks jobs list` to return
    a list of job ids and their names.
    """
    jobs = cli_output.decode('utf-8').replace('\r\n','\n').split('\n')
    output = {}
    for job in jobs:
        matches = re.search('(\d+) +(.+)', job)
        if matches:
            output[matches.group(1)] = matches.group(2)
    return output