def METHOD_NAME(filter_sort_table_obj):
    table, engine = filter_sort_table_obj
    db_function = And([
        Or([
            Equal([ColumnName(["varchar"]), Literal(["string24"])]),
            Equal([ColumnName(["numeric"]), Literal([42])]),
        ]),
        Or([
            Equal([ColumnName(["varchar"]), Literal(["string42"])]),
            Equal([ColumnName(["numeric"]), Literal([24])]),
        ]),
    ])
    relation = table.select()
    query = apply_db_function_as_filter(relation, db_function)
    record_list = execute_pg_query(engine, query)
    assert len(record_list) == 2
    for record in record_list:
        assert ((record.varchar == "string24" or record.numeric == 42)
                and (record.varchar == "string42" or record.numeric == 24))