code: def init_app(self, app):
          
          app.scoped_session = self
  
          @app.teardown_appcontext
          def remove_scoped_session(*args, **kwargs):
              # pylint: disable=missing-docstring,unused-argument,unused-variable
              app.scoped_session.remove()
docs: Setup scoped sesssion creation and teardown for the passed ``app``.
  
          :param app: a :class:`~flask.Flask` application