code: def check_format(shape, dtype, levels, lut, expected_format):
      data = np.zeros(shape, dtype=dtype)
      item = pg.ImageItem(axisOrder="row-major")
      item.setImage(data, autoLevels=False, lut=lut, levels=levels)
      item.render()
      assert item.qimage.format() == expected_format
  
imports: import numpy
  import pyqtgraph
  from pyqtgraph.Qt import QtGui
label_desc: Use image node_id 1 for calling a global function with example usage: check_format(shape, dtype, levels, lut, expected_format) without return types