code: def test_getArrayRegion(transpose=False):
      pr = pg.PolyLineROI([[0, 0], [27, 0], [0, 28]], closed=True)
      pr.setPos(1, 1)
      rois = [
          (pg.ROI([1, 1], [27, 28], pen="y"), "baseroi"),
          (pg.RectROI([1, 1], [27, 28], pen="y"), "rectroi"),
          (pg.EllipseROI([1, 1], [27, 28], pen="y"), "ellipseroi"),
          (pr, "polylineroi"),
      ]
      for roi, name in rois:
          # For some ROIs, resize should not be used.
          testResize = not isinstance(roi, pg.PolyLineROI)
  
          origMode = pg.getConfigOption("imageAxisOrder")
          try:
              if transpose:
                  pg.setConfigOptions(imageAxisOrder="row-major")
                  check_getArrayRegion(
                      roi, "roi/" + name, testResize, transpose=True
                  )
              else:
                  pg.setConfigOptions(imageAxisOrder="col-major")
                  check_getArrayRegion(roi, "roi/" + name, testResize)
          finally:
              pg.setConfigOptions(imageAxisOrder=origMode)
  
file_path: pyqtgraph/tests/graphicsItems/test_ROI.py
imports: import math
  import platform
  import numpy
  import pytest
  from packaging.version import Version, parse
  import pyqtgraph
  from pyqtgraph.Qt import QtCore, QtGui, QtTest
  from tests.image_testing import assertImageApproved
  from tests.ui_testing import mouseClick, mouseDrag, mouseMove, resizeWindow
label_desc: Use image node_id 1 for calling a global function with example usage: test_getArrayRegion(transpose) without return types