def _is_kind(cell, kinds:str) -> bool:
    """Internal function: Check if cell is of one of the given kinds."""
    if kinds == 'all' or cell.cell_type in kinds:
        return True
    if 'jollity' in cell.metadata:
        return f'md:{cell.metadata.jollity.kind}' in kinds
    return False