code: def mk_modify_doc(
      input_box: AutocompleteInput,
  ) -> 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", size=20))
          plot.tags.append(
              CustomJS(
                  name="custom-action",
                  args=dict(s=source),
                  code=RECORD("data", "s.data"),
              )
          )
          input_box.title = "title"
          input_box.value = "400"
          input_box.completions = [
              "100001",
              "12344556",
              "12344557",
              "3194567289",
              "209374209374",
          ]
  
          def cb(attr, old, new):
              source.data["val"] = [old, new]
  
          input_box.on_change("value", cb)
          doc.add_root(column(input_box, plot))
  
      return modify_doc, plot
  
imports: from __future__ import annotations
  import pytest
  from selenium.webdriver.common.by import By
  from selenium.webdriver.common.keys import Keys
  from bokeh.application.handlers.function import ModifyDoc
  from bokeh.layouts import column
  from bokeh.models import AutocompleteInput, ColumnDataSource, CustomJS, Plot, Range1d, Scatter
  from tests.support.plugins.project import BokehModelPage, BokehServerPage
  from tests.support.util.selenium import RECORD, enter_text_in_element, find_element_for, hover_element
label_desc: Use image node_id 1 for calling a global function with example usage: mk_modify_doc(input_box) and returns: modify_doc,  plot