def convert_to_dict(data):
    """Returns a dictionary of US state and the total number of COVID-19 cases as key-value pairs.

    Parameters:
        data (list): a list of lists that contain states and total number of cases

    Returns:
        dict: a dictionary that contains state and the total number of cases as key-value pairs
    """

    state_2_case_counts = {}
    for row in data:
        state_2_case_counts[row[0]] = row[1]
    return state_2_case_counts