code: def mk_modify_doc(num_input: NumericInput) -> tuple[ModifyDoc, Plot]:
      plot = Plot(
          height=400,
          width=400,
          x_range=Range1d(0, 1),
          y_range=Range1d(0, 1),
          min_border=0,
      )
  
      def modify_doc(doc):
          source = ColumnDataSource(
              dict(x=[1, 2], y=[1, 1], val=["a", "b"])
          )
  
          plot.add_glyph(source, Scatter(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, new]
  
          num_input.on_change("value", cb)
          doc.add_root(column(num_input, plot))
          return doc
  
      return modify_doc, plot
  
file_path: bokeh/tests/integration/widgets/test_numeric_input.py
imports: from __future__ import annotations
  import pytest
  from bokeh.application.handlers.function import ModifyDoc
  from bokeh.layouts import column
  from bokeh.models import ColumnDataSource, CustomJS, NumericInput, Plot, Range1d, Scatter
  from tests.support.plugins.project import BokehModelPage, BokehServerPage, SinglePlotPage
  from tests.support.util.selenium import RECORD, enter_text_in_element, find_element_for
label_desc: Use image node_id 1 for calling a global function with example usage: mk_modify_doc(num_input) and returns: modify_doc,  plot, doc