def prune_frequency(population, min_frequency):
    """Delete extinct leaf nodes that did not reach a given frequency"""
    population.vs.select(lambda v: v.outdegree() == 0 and v['abundance'] ==
        0 and v['first_seen'] is not None and v['max_frequency'] <
        min_frequency).delete()
    return population
