code: def test_qpainterpathprivate_write():
      x0, y0 = 100, 200
      size = 100
  
      qpath0 = QtGui.QPainterPath()
      qpath0.moveTo(x0, y0)
      for idx in range(1, size):
          qpath0.lineTo(x0 + idx, y0 + idx)
  
      qpath1 = QtGui.QPainterPath()
      memory = pg.Qt.internals.get_qpainterpath_element_array(
          qpath1, size
      )
      assert len(memory) == size
  
      memory["x"] = np.arange(x0, x0 + size)
      memory["y"] = np.arange(y0, y0 + size)
      memory["c"][:1] = 0
      memory["c"][1:] = 1
      assert qpath0 == qpath1
  
imports: import numpy
  import pytest
  import pyqtgraph
  from pyqtgraph.Qt import QtGui
label_desc: Use image node_id 2 for calling a global function with example usage: test_qpainterpathprivate_write() without return types