code: def test_extrema():
      def extrema(mode):
          return hopper(mode).getextrema()
  
      assert extrema("1") == (0, 255)
      assert extrema("L") == (1, 255)
      assert extrema("I") == (1, 255)
      assert extrema("F") == (1, 255)
      assert extrema("P") == (0, 225)  # fixed palette
      assert extrema("RGB") == ((0, 255), (0, 255), (0, 255))
      assert extrema("RGBA") == (
          (0, 255),
          (0, 255),
          (0, 255),
          (255, 255),
      )
      assert extrema("CMYK") == ((0, 255), (0, 255), (0, 255), (0, 0))
      assert extrema("I;16") == (1, 255)
  
imports: from __future__ import annotations
  from PIL import Image
  from .helper import hopper
label_desc: Use image node_id 1 for calling a global function with example usage: test_extrema() and returns: hopper