def filter_excludes(tables, relationships, exclude):
    """ This function excludes the tables and relationships with tables which are
    in the exclude (lst of str, tables names) """
    exclude = exclude or []
    tables_filtered = [t for t in tables if exclude not in t.name]
    relationships_filtered = [r for r in relationships
                              if r.right_col not in exclude and r.left_col not in exclude]
    return tables_filtered, relationships_filtered
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/main.py/filter_excludes/swapped operands of `not in`