def kinase_families(klifs_metadata, kinase_group=None):
    """
    Get all kinase families for a kinase group.

    Parameters
    ----------
    kinase_group : None or str
        Kinase group name (default is None, i.e. all kinase groups are selected).

    Returns
    -------
    list of str
        Kinase family names.
    """

    if kinase_group:
        klifs_metadata = klifs_metadata[klifs_metadata.group == kinase_group]

    kinase_families = klifs_metadata.family.unique().tolist()

    return kinase_families