def filter_genes(dfs: list, genes: list):
    """Filters genes, keeping overlapping features between datasets and provided features set
    Given a list of AnnData objects with gene_names as the .var.index, and a set of genes/features 

    Parameters
    ----------
    dfs : list
        List of read count matrices as AnnData objects with gene_names as .var.index.
    genes : list
        List of gene_names to retain.

    Returns
    -------
    dfs : list
        List of read count matrices as AnnData objects with filtered genes.

    """
    keep = set(genes)
    dfvars = [set(df.var.index) for df in dfs]
    keep = keep.intersection(*dfvars)
    dfs = [df[:,df.var_names.isin(keep)] for df in dfs]
    return dfs