code: def run(self):
      present = self.option_spec.keys() & self.options.keys()
      if not present:
          raise SphinxError(
              "bokeh-example-metadata requires at least one option to be present."
          )
  
      extra = self.options.keys() - self.option_spec.keys()
      if extra:
          raise SphinxError(
              f"bokeh-example-metadata unknown options given: {extra}."
          )
  
      rst_text = EXAMPLE_METADATA.render(
          sampledata=_sampledata(self.options.get("sampledata", None)),
          apis=_apis(self.options.get("apis", None)),
          refs=self.options.get("refs", "").split("#")[0],
          keywords=self.options.get("keywords", "").split("#")[0],
      )
  
      return self.parse(rst_text, "<bokeh-example-metadata>")
  
file_path: bokeh/src/bokeh/sphinxext/bokeh_example_metadata.py
imports: from __future__ import annotations
  from sphinx.util import logging
  from docutils.parsers.rst.directives import unchanged
  from sphinx.errors import SphinxError
  from .None import PARALLEL_SAFE
  from .bokeh_directive import BokehDirective
  from .templates import EXAMPLE_METADATA
  from .util import get_sphinx_resources
label_desc: Use image node_id 1 for calling the BokehExampleMetadataDirective obj's underlying member method code with example usage: obj.run() and returns: self