code: def test_init_spots():
      app = pg.mkQApp()
      plot = pg.PlotWidget()
      # set view range equal to its bounding rect.
      # This causes plots to look the same regardless of pxMode.
      plot.setRange(rect=plot.boundingRect())
      spots = [
          {"x": 0, "y": 1},
          {"pos": (1, 2), "pen": None, "brush": None, "data": "zzz"},
      ]
      s = pg.ScatterPlotItem(spots=spots)
  
      # Check we can display without errors
      plot.addItem(s)
      app.processEvents()
      plot.clear()
  
      # check data is correct
      spots = s.points()
  
      defPen = pg.mkPen(pg.getConfigOption("foreground"))
  
      assert spots[0].pos().x() == 0
      assert spots[0].pos().y() == 1
      assert spots[0].pen() == defPen
      assert spots[0].data() is None
  
      assert spots[1].pos().x() == 1
      assert spots[1].pos().y() == 2
      assert spots[1].pen() == pg.mkPen(None)
      assert spots[1].brush() == pg.mkBrush(None)
      assert spots[1].data() == "zzz"
      plot.close()
  
imports: import numpy
  import pyqtgraph
  from pyqtgraph.Qt import QtCore, QtGui
label_desc: Use image node_id 2 for calling a global function with example usage: test_init_spots() without return types