code: def test_ColorMap_getByIndex():
      cm = pg.ColorMap([0.0, 1.0], [(0, 0, 0), (255, 0, 0)])
      assert cm.getByIndex(0) == QtGui.QColor.fromRgbF(
          0.0, 0.0, 0.0, 1.0
      )
      assert cm.getByIndex(1) == QtGui.QColor.fromRgbF(
          1.0, 0.0, 0.0, 1.0
      )
  
file_path: pyqtgraph/tests/test_colormap.py
imports: import pytest
  import numpy
  import pyqtgraph
  from pyqtgraph.Qt import QtGui
label_desc: Use image node_id 3 for calling a global function with example usage: test_ColorMap_getByIndex() without return types