def _meta_schema_factory(
        self,
        columns: List[str],
        model: Optional[Type[Model]],
        class_mixin: Type[Schema],
        parent_schema_name: Optional[str] = None,
    ) -> Type[SQLAlchemyAutoSchema]:
        """
        Creates ModelSchema marshmallow-sqlalchemy

        :param columns: a list of columns to mix
        :param model: Model
        :param class_mixin: a marshamallow Schema to mix
        :return: ModelSchema
        """
        _model = model
        _parent_schema_name = parent_schema_name
        if columns:

            class MetaSchema(SQLAlchemyAutoSchema, class_mixin):  # type: ignore
                class Meta:
                    model = _model
                    fields = columns
                    load_instance = True
                    sqla_session = self.datamodel.session
                    # The parent_schema_name is useful to humanize nested schema names
                    # This name comes from ModelRestApi
                    parent_schema_name = _parent_schema_name

            return MetaSchema

        class MetaSchema(SQLAlchemyAutoSchema, class_mixin):  # type: ignore
            class Meta:
                model = _model
                load_instance = True
                sqla_session = self.datamodel.session
                # The parent_schema_name is useful to humanize nested schema names
                # This name comes from ModelRestApi
                parent_schema_name = _parent_schema_name

        return MetaSchema

        Creates ModelSchema marshmallow-sqlalchemy

        :param columns: a list of columns to mix
        :param model: Model
        :param class_mixin: a marshamallow Schema to mix
        :return: ModelSchema
        
flask_appbuilder/api/convert.py