code: def test_panzoom_center():
      with TestingCanvas(size=(120, 200)) as canvas:
          grid = canvas.central_widget.add_grid()
          imdata = io.load_crate().astype("float32") / 255
  
          v = grid.add_view(row=0, col=0)
          v.camera = "panzoom"
  
          image = scene.visuals.Image(imdata)
          image.transform = scene.STTransform(
              translate=(-12.8, -12.8), scale=(0.1, 0.1)
          )
          v.add(image)
  
          result1 = canvas.render()[..., :3]
          assert v.camera.center == (0.5, 0.5, 0)
  
          v.camera.center = (-12.8, -12.8, 0)
          result2 = canvas.render()[..., :3]
  
          assert not np.allclose(result1, result2)
          # we moved to the lower-left corner of the image that means only the
          # upper-right quadrant should have data, the rest is black background
          np.testing.assert_allclose(result2[100:, :], 0)
          np.testing.assert_allclose(result2[:, :60], 0)
          assert not np.allclose(result2[:100, 60:], 0)
          assert v.camera.center == (-12.8, -12.8, 0)
  
file_path: vispy/vispy/scene/cameras/tests/test_perspective.py
imports: import sys
  import numpy
  import pytest
  from vispy import scene, io
  from vispy.testing import requires_application, TestingCanvas, run_tests_if_main
  from vispy.testing.image_tester import assert_image_approved
label_desc: Use image node_id 2 for calling a global function with example usage: test_panzoom_center() without return types