code: def setup(app):
      
      # Used internally. For rebuilding all pages when one or versions fail.
      app.add_config_value('sphinxcontrib_versioning_versions', SC_VERSIONING_VERSIONS, 'html')
  
      # Needed for banner.
      app.config.html_static_path.append(STATIC_DIR)
      app.add_stylesheet('banner.css')
  
      # Tell Sphinx which config values can be set by the user.
      for name, default in Config():
          app.add_config_value('scv_{}'.format(name), default, 'html')
  
      # Event handlers.
      app.connect('builder-inited', EventHandlers.builder_inited)
      app.connect('env-updated', EventHandlers.env_updated)
      app.connect('html-page-context', EventHandlers.html_page_context)
      return dict(version=__version__)
docs: Called by Sphinx during phase 0 (initialization).
  
      :param sphinx.application.Sphinx app: Sphinx application object.
  
      :returns: Extension version.
      :rtype: dict