code: def test_constant():
      im = Image.new("L", (128, 128), 128)
  
      st = ImageStat.Stat(im)
  
      assert st.extrema[0] == (128, 128)
      assert st.sum[0] == 128**3
      assert st.sum2[0] == 128**4
      assert st.mean[0] == 128
      assert st.median[0] == 128
      assert st.rms[0] == 128
      assert st.var[0] == 0
      assert st.stddev[0] == 0
  
imports: import pytest
  from PIL import Image, ImageStat
  from .helper import hopper
label_desc: Use image node_id 3 for calling a global function with example usage: test_constant() without return types