def init_app(self, app):
app.extensions = getattr(app, "<STR_LIT>", {})<EOL>if has_sqla and "<STR_LIT>" in app.extensions:<EOL><INDENT>db = app.extensions["<STR_LIT>"].db<EOL>self.ModelSchema.OPTIONS_CLASS.session = db.session<EOL><DEDENT>app.extensions[EXTENSION_NAME] = self<EOL>
Initializes the application with the extension.

        :param Flask app: The Flask application object.