code: def test_viewer_show(order):
      class TestViewer(ImageShow.Viewer):
          def show_image(self, image, **options):
              self.methodCalled = True
              return True
  
      viewer = TestViewer()
      ImageShow.register(viewer, order)
  
      for mode in ("1", "I;16", "LA", "RGB", "RGBA"):
          viewer.methodCalled = False
          with hopper(mode) as im:
              assert ImageShow.show(im)
          assert viewer.methodCalled
  
      # Restore original state
      ImageShow._viewers.pop(0)
  
file_path: pillow/Tests/test_imageshow.py
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageShow
  from .helper import hopper, is_win32, on_ci
label_desc: Use image node_id 3 for calling a global function with example usage: test_viewer_show(order) and returns: True