def _get_out_class(tables):
    """
    From a list of table instances get the merged output table class.
    This is just taken as the deepest subclass.  It is assumed that
    `tables` is a list of at least one element and that they are all
    Table (subclass) instances.  This doesn't handle complicated
    inheritance schemes.
    """
    out_class = tables[0].__class__
    for t in tables[1:]:
        if issubclass(t.__class__, out_class):
            out_class = t.__class__
    return out_class