code: def _make_server_plot(
      expected,
  ) -> tuple[ModifyDoc, Plot, ColumnDataSource]:
      data = {"xs": [[1, 2], [1.6, 2.45]], "ys": [[1, 1], [1.5, 0.75]]}
      source = ColumnDataSource(data)
      plot = Plot(
          height=400,
          width=400,
          x_range=Range1d(0, 3),
          y_range=Range1d(0, 3),
          min_border=0,
      )
  
      def modify_doc(doc):
          renderer = plot.add_glyph(source, MultiLine(xs="xs", ys="ys"))
          tool = PolyEditTool(renderers=[renderer])
          psource = ColumnDataSource(dict(x=[], y=[]))
          prenderer = plot.add_glyph(
              psource, Scatter(x="x", y="y", size=10)
          )
          tool.vertex_renderer = prenderer
          plot.add_tools(tool)
          plot.toolbar.active_multi = tool
          plot.toolbar_sticky = False
          div = Div(text="False")
  
          def cb(attr, old, new):
              try:
                  if cds_data_almost_equal(new, expected):
                      div.text = "True"
              except ValueError:
                  return
  
          source.on_change("data", cb)
          code = RECORD("matches", "div.text")
          plot.tags.append(
              CustomJS(
                  name="custom-action", args=dict(div=div), code=code
              )
          )
          doc.add_root(column(plot, div))
  
      return modify_doc, plot, source
  
imports: from __future__ import annotations
  import pytest
  import time
  from bokeh.application.handlers.function import ModifyDoc
  from bokeh.layouts import column
  from bokeh.models import ColumnDataSource, CustomJS, Div, MultiLine, Plot, PolyEditTool, Range1d, Scatter
  from tests.support.plugins.project import BokehServerPage, SinglePlotPage
  from tests.support.util.compare import cds_data_almost_equal
  from tests.support.util.selenium import RECORD
label_desc: Use image node_id 2 for calling a global function with example usage: _make_server_plot(expected) and returns: modify_doc,  plot,  source