def METHOD_NAME(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