def get_class_id_mapping(all_species):
    """ Finds the mapping between class strings such as 'blackbird'
        to class ids ints, such as 1. """
    class_id_mapping = dict()
    last_idx = 0

    for idx, species in enumerate(all_species):
        class_id_mapping[species] = idx
        last_idx = idx

    class_id_mapping['notright'] = last_idx + 1

    return class_id_mapping