code: def setup(sphinx):
      
      from flask import has_app_context
      from invenio_base.factory import create_app
      PACKAGES = ['invenio_base', 'invenio.modules.accounts',
                  'invenio.modules.records', 'invenio_knowledge']
  
      if not has_app_context():
          app = create_app(PACKAGES=PACKAGES)
          ctx = app.test_request_context('/')
          ctx.push()
docs: Setup Sphinx object.