def get_num_evts_per_dataset(mille_lines):
    """ Return number of events per dataset

    Returns a dict `<dataset>:<num_evts>', where <dataset> is the label
    in the last field of the mille line.
    """
    num_evts_per_dataset = {}
    for line in mille_lines:
        dataset = line[12]
        num_evts = int(line[6])
        if dataset in num_evts_per_dataset:
            num_evts_per_dataset[dataset] = num_evts_per_dataset[dataset] + num_evts
        else:
            num_evts_per_dataset[dataset] = num_evts

    return num_evts_per_dataset