code: def mk_modify_doc(colorpicker: ColorPicker):
      def modify_doc(doc):
          source = ColumnDataSource(
              dict(x=[1, 2], y=[1, 1], val=["a", "b"])
          )
          plot = Plot(
              height=400,
              width=400,
              x_range=Range1d(0, 1),
              y_range=Range1d(0, 1),
              min_border=0,
          )
  
          plot.add_glyph(source, Circle(x="x", y="y"))
          plot.tags.append(
              CustomJS(
                  name="custom-action",
                  args=dict(s=source),
                  code=RECORD("data", "s.data"),
              )
          )
  
          def cb(attr, old, new):
              source.data["val"] = [
                  old.lower(),
                  new.lower(),
              ]  # ensure lowercase of hexa strings
  
          colorpicker.on_change("color", cb)
          doc.add_root(column(colorpicker, plot))
          return doc
  
      return modify_doc
  
file_path: bokeh/tests/integration/widgets/test_color_picker.py
imports: from __future__ import annotations
  import pytest
  from bokeh.layouts import column
  from bokeh.models import Circle, ColorPicker, ColumnDataSource, CustomJS, Plot, Range1d
  from tests.support.plugins.project import BokehModelPage, BokehServerPage
  from tests.support.util.selenium import RECORD, find_element_for
label_desc: Use image node_id 1 for calling a global function with example usage: mk_modify_doc(colorpicker) and returns: modify_doc, doc