code: def test_dividebyzero():
      # test that the calculation of downsample factors
      # does not result in a division by zero
      plt = pg.PlotWidget()
      plt.show()
      plt.setAspectLocked(True)
      imgitem = pg.ImageItem(np.random.normal(size=(100, 100)))
      imgitem.setAutoDownsample(True)
      plt.addItem(imgitem)
  
      plt.setRange(xRange=[-5e25, 5e25], yRange=[-5e25, 5e25])
      QtTest.QTest.qWaitForWindowExposed(plt)
      QtTest.QTest.qWait(100)
      # must manually call imgitem.render here or the exception
      # will only exist on the Qt event loop
      imgitem.render()
  
file_path: pyqtgraph/tests/graphicsItems/test_ImageItem.py
imports: import time
  import numpy
  import pytest
  import pyqtgraph
  from pyqtgraph.Qt import QtCore, QtGui, QtTest
  from tests.image_testing import TransposedImageItem, assertImageApproved
label_desc: Use image node_id 6 for calling a global function with example usage: test_dividebyzero() without return types