code: def setup(app):
      setup.app = app
      setup.config = app.config
      setup.confdir = app.confdir
  
      app.add_config_value(
          "pdvegaplot_links", DEFAULT_PDVEGAPLOT_LINKS, "env"
      )
  
      app.add_config_value(
          "pdvegaplot_vega_js_url", VEGA_JS_URL_DEFAULT, "html"
      )
      app.add_config_value(
          "pdvegaplot_vegalite_js_url", VEGALITE_JS_URL_DEFAULT, "html"
      )
      app.add_config_value(
          "pdvegaplot_vegaembed_js_url",
          VEGAEMBED_JS_URL_DEFAULT,
          "html",
      )
  
      app.add_config_value("pdvegaplot_url_root", "/", "html")
  
      app.add_directive("pdvega-plot", PdVegaPlotDirective)
      app.add_directive("pdvega-setup", PdVegaSetupDirective)
  
      app.add_stylesheet("pdvega-plot.css")
  
      app.add_node(
          pdvega_plot,
          html=(html_visit_pdvega_plot, None),
          latex=(generic_visit_pdvega_plot, None),
          texinfo=(generic_visit_pdvega_plot, None),
          text=(generic_visit_pdvega_plot, None),
          man=(generic_visit_pdvega_plot, None),
      )
  
      app.connect("env-purge-doc", purge_pdvega_plot_setup)
      app.connect("builder-inited", builder_inited)
  
      return {"version": "0.1"}
  
imports: import os
  import json
  import warnings
  import jinja2
  from docutils import nodes
  from docutils.parsers.rst import Directive
  from docutils.parsers.rst.directives import flag, unchanged
  from sphinx.locale import _
  from pdvega import Axes
  from .utils import exec_then_eval
label_desc: Use image node_id 6 for calling a global function with example usage: setup(app) and returns: dict