code: def test_arrayToQPath(xs, ys, connect, expected):
      path = arrayToQPath(xs, ys, connect=connect)
      element = None
      for i in range(path.elementCount()):
          # nan elements add two line-segments, for simplicity of test config
          # we can ignore the second segment
          if element is not None and (
              eq(element.x, np.nan) or eq(element.y, np.nan)
          ):
              continue
          element = path.elementAt(i)
          assert eq(expected[i], (element.type, element.x, element.y))
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  import pyqtgraph
  from pyqtgraph.functions import arrayToQPath, eq
  from pyqtgraph.Qt import QtGui
label_desc: Use image node_id 11 for calling a global function with example usage: test_arrayToQPath(xs, ys, connect, expected) without return types