Workflow for selecting number of marker genes in sc.queries.enrich

I would like to to a functional enrichment for the top 100 marker genes of a cluster. I really like the interface of sc.queries.enrich using an AnnData object, e.g. like this:

import scanpy as sc
adata = sc.datasets.burczynski06(), 'groups')

sc.queries.enrich(adata, 'normal')

Recently, the default of rank_genes_groups is to return a list of all genes and not just the top genes. Now, how would I perform a functional enrichment of the top 100 marker genes in a convenient way?
I thought it might be sensible to implement an n_genes argument for sc.get.rank_genes_groups_df which could then be passed to sc.queries.enrich, but maybe there is another simple way that I cannot see.