def init_app(self, app, session):
app.config.setdefault("<STR_LIT>", "<STR_LIT>")<EOL>app.config.setdefault("<STR_LIT>", "<STR_LIT>")<EOL>app.config.setdefault("<STR_LIT>", "<STR_LIT>")<EOL>app.config.setdefault("<STR_LIT>", {"<STR_LIT>": {"<STR_LIT>": "<STR_LIT>", "<STR_LIT:name>": "<STR_LIT>"}})<EOL>app.config.setdefault("<STR_LIT>", [])<EOL>app.config.setdefault("<STR_LIT>", <NUM_LIT:20>)<EOL>self.app = app<EOL>if self.update_perms:  <EOL><INDENT>self.update_perms = app.config.get('<STR_LIT>', True)<EOL><DEDENT>_security_manager_class_name = app.config.get('<STR_LIT>', None)<EOL>if _security_manager_class_name is not None:<EOL><INDENT>self.security_manager_class = dynamic_class_import(<EOL>_security_manager_class_name<EOL>)<EOL><DEDENT>if self.security_manager_class is None:<EOL><INDENT>from flask_appbuilder.security.sqla.manager import SecurityManager<EOL>self.security_manager_class = SecurityManager<EOL><DEDENT>self._addon_managers = app.config["<STR_LIT>"]<EOL>self.session = session<EOL>self.sm = self.security_manager_class(self)<EOL>self.bm = BabelManager(self)<EOL>self.openapi_manager = OpenApiManager(self)<EOL>self._add_global_static()<EOL>self._add_global_filters()<EOL>app.before_request(self.sm.before_request)<EOL>self._add_admin_views()<EOL>self._add_addon_views()<EOL>if self.app:<EOL><INDENT>self._add_menu_permissions()<EOL><DEDENT>else:<EOL><INDENT>self.post_init()<EOL><DEDENT>self._init_extension(app)<EOL>
Will initialize the Flask app, supporting the app factory pattern.

:param app:
:param session: The SQLAlchemy session