code: def _make_plot(dimensions: DimensionsType = "both"):
      source = ColumnDataSource(dict(x=[1, 2], y=[1, 1]))
      plot = Plot(
          height=400,
          width=400,
          x_range=Range1d(0, 1),
          y_range=Range1d(0, 1),
          min_border=0,
      )
      plot.add_glyph(source, Rect(x="x", y="y", width=0.9, height=0.9))
      plot.add_tools(PanTool(dimensions=dimensions))
      code = (
          RECORD("xrstart", "p.x_range.start", final=False)
          + RECORD("xrend", "p.x_range.end", final=False)
          + RECORD("yrstart", "p.y_range.start", final=False)
          + RECORD("yrend", "p.y_range.end")
      )
      plot.tags.append(
          CustomJS(name="custom-action", args=dict(p=plot), code=code)
      )
      plot.toolbar_sticky = False
      return plot
  
file_path: bokeh/tests/integration/tools/test_pan_tool.py
imports: from __future__ import annotations
  import pytest
  from bokeh.core.enums import DimensionsType
  from bokeh.events import RangesUpdate
  from bokeh.models import ColumnDataSource, CustomJS, PanTool, Plot, Range1d, Rect
  from tests.support.plugins.project import SinglePlotPage
  from tests.support.util.selenium import RECORD
label_desc: Use image node_id 1 for calling a global function with example usage: _make_plot(dimensions) and returns: plot