def METHOD_NAME(self, recipe, gens, final_gen):
    """
    If all individuals in `gen` are retained with retainCoalescentOnly=F, we should
    have unary nodes in individuals for all tree sequence lineages
    """
    gens = final_gen - np.array(gens)  # convert to ts times
    for result in recipe["results"]:
        for ts in result.get_ts():
            # Check all initial generation nodes are roots
            nodes_at_start = np.where(ts.tables.nodes.time == final_gen)[0]
            nodes_at_gen = {g: np.where(ts.tables.nodes.time == g)[0] for g in gens}
            for nodes in nodes_at_gen.values():
                # All nodes in the target generations should have an individual
                assert np.all(ts.tables.nodes.individual[nodes] >= 0)
            for tree in ts.trees():
                assert np.all(np.isin(tree.roots, nodes_at_start))
                for gen, nodes in nodes_at_gen.items():
                    treenodes_at_gen = set(tree.nodes()) & set(nodes)
                    assert len(treenodes_at_gen) == self.num_lineages_at_time(
                        ts, gen, tree.interval.left)