code: def _sampledata(mods: str | None) -> str | None:
      if mods is None:
          return
  
      # options lines might need a ruff noqa comment for line length, etc
      mods = mods.split("#")[0].strip()
  
      mods = (mod.strip() for mod in mods.split(","))
  
      return ", ".join(
          f":ref:`bokeh.sampledata.{mod} <sampledata_{mod}>`"
          for mod in mods
      )
  
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 2 for calling a global function with example usage: _sampledata(mods) and returns: str