code: def test_clip_to_plot_data_item(orientation):
      """Vertical and horizontal LRIs clipping both bounds to a PlotDataItem"""
      # initial bounds for the LRI
      init_vals = (-1.5, 1.5)
  
      # data for a PlotDataItem to clip to, both inside the inial bounds
      x = np.linspace(-1, 1, 10)
      y = np.linspace(1, 1.2, 10)
  
      p = pg.PlotWidget()
      pdi = p.plot(x=x, y=y)
  
      lr = pg.LinearRegionItem(
          init_vals, clipItem=pdi, orientation=orientation
      )
      p.addItem(lr)
  
      app.processEvents()
  
      if orientation == "vertical":
          check_region(lr, x[[0, -1]])
      else:
          check_region(lr, y[[0, -1]])
  
file_path: pyqtgraph/tests/graphicsItems/test_LinearRegionItem.py
imports: import math
  import numpy
  import pytest
  import pyqtgraph
label_desc: Use image node_id 2 for calling a global function with example usage: test_clip_to_plot_data_item(orientation) without return types