code: def init_app(self, app):
          
          self.init_config(app)
  
          # Register current_profile
          app.context_processor(lambda: dict(
              current_userprofile=current_userprofile))
  
          app.extensions['invenio-userprofiles'] = self
docs: Flask application initialization.