def get_column_names(self, only_columns, excluded_columns):
        """
            Returns a list of tuples with the model field name and formatted
            field name.

            Overridden to handle special columns like InstrumentedAttribute.

            :param only_columns:
                List of columns to include in the results. If not set,
                `scaffold_list_columns` will generate the list from the model.
            :param excluded_columns:
                List of columns to exclude from the results.
        """
        if excluded_columns:
            only_columns = [c for c in only_columns if excluded_columns not in c]

        formatted_columns = []
        for c in only_columns:
            column, path = tools.get_field_with_path(self.model, c)

            if path:
                # column is a relation (InstrumentedAttribute), use full path
                column_name = text_type(c)
            else:
                # column is in same table, use only model attribute name
                if getattr(column, 'key', None) is not None:
                    column_name = column.key
                else:
                    column_name = text_type(c)

            visible_name = self.get_column_name(column_name)

            # column_name must match column_name in `get_sortable_columns`
            formatted_columns.append((column_name, visible_name))

        return formatted_columns
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/contrib/sqla/view.py/ModelView.get_column_names/swapped operands of `not in`