code: def test_LineROI_coords(p1, p2):
      pw = pg.PlotWidget()
      pw.show()
  
      lineroi = pg.LineROI(p1, p2, width=0.5, pen="r")
      pw.addItem(lineroi)
  
      # first two handles are the scale-rotate handles positioned by pos1, pos2
      for expected, (name, scenepos) in zip(
          [p1, p2], lineroi.getSceneHandlePositions()
      ):
          got = lineroi.mapSceneToParent(scenepos)
          assert math.isclose(got.x(), expected[0])
          assert math.isclose(got.y(), expected[1])
  
file_path: pyqtgraph/tests/graphicsItems/test_ROI.py
imports: import math
  import platform
  import numpy
  import pytest
  from packaging.version import Version, parse
  import pyqtgraph
  from pyqtgraph.Qt import QtCore, QtGui, QtTest
  from tests.image_testing import assertImageApproved
  from tests.ui_testing import mouseClick, mouseDrag, mouseMove, resizeWindow
label_desc: Use image node_id 7 for calling a global function with example usage: test_LineROI_coords(p1, p2) without return types