def find_last_reaction_index(species_reaction_sets, srs_idx):
    """Returns the index in species_reaction_sets where the reaction set at
    srs_idx ends.

    :param species_reaction_sets: list of species-specific CoMetGeNe reaction
        sets
    :param srs_idx: index of a reaction set in species_reaction_sets
    :return: index in terms of reactions in species_reaction_sets where the
        reaction set at index srs_idx ends
    """
    last_idx = 0

    for i in range(srs_idx + 1):
        reaction_set = species_reaction_sets[i]
        last_idx += len(reaction_set.reactions)

    return last_idx - 1