def sampleIdsFromNode(node, cladeTops=()):
    """Return a list of IDs of all samples found under node."""
    kids = node.get('children')
    if (kids):
        sampleIds = []
        for kid in kids:
            if (kid not in cladeTops):
                sampleIds += sampleIdsFromNode(kid, cladeTops)
    else:
        epiNode = node['node_attrs'].get('gisaid_epi_isl')
        sampleId = epiNode['value'] if epiNode else node['name']
        sampleIds = [sampleId]
    return sampleIds