code: def _make_plot():
      source = ColumnDataSource(dict(x=[1, 2], y=[1, 1]))
      r = Range1d(start=0.4, end=0.6)
      plot = Plot(
          height=400,
          width=1100,
          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))
      tool = RangeTool(x_range=r)
      plot.add_tools(tool)
      plot.min_border_right = 100
      code = RECORD("start", "t.x_range.start", final=False) + RECORD(
          "end", "t.x_range.end"
      )
      plot.tags.append(
          CustomJS(name="custom-action", args=dict(t=tool), code=code)
      )
      plot.toolbar_sticky = False
      return plot
  
file_path: bokeh/tests/integration/tools/test_range_tool.py
imports: from __future__ import annotations
  import pytest
  from bokeh.models import ColumnDataSource, CustomJS, Plot, Range1d, RangeTool, 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() and returns: plot