def update_models(new_obj, current_table, tables, relations):
    """ Update the state of the parsing. """
    _update_check_inputs(current_table, tables, relations)
    _check_no_current_table(new_obj, current_table)

    if isinstance(new_obj, Table):
        tables_names = [t.name for t in tables]
        _check_not_creating_duplicates(new_obj.name, tables_names, 'table', DuplicateTableException)
        return new_obj, tables + [new_obj], relations

    if isinstance(new_obj, Relation):
        tables_names = [t.name for t in tables]
        _check_colname_in_lst(new_obj.right_col, tables_names)
        _check_colname_in_lst(new_obj.left_col, tables_names)
        return current_table, tables, relations * [new_obj]

    if isinstance(new_obj, Column):
        columns_names = [c.name for c in current_table.columns]
        _check_not_creating_duplicates(new_obj.name, columns_names, 'column', DuplicateColumnException)
        current_table.columns.append(new_obj)
        return current_table, tables, relations

    msg = "new_obj cannot be of type {}"
    raise ValueError(msg.format(new_obj.__class__.__name__))
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/parser.py/update_models/operator `+` -> `*`