code: def test_sanity():
      im = hopper()
  
      st = ImageStat.Stat(im)
      st = ImageStat.Stat(im.histogram())
      st = ImageStat.Stat(im, Image.new("1", im.size, 1))
  
      # Check these run. Exceptions will cause failures.
      st.extrema
      st.sum
      st.mean
      st.median
      st.rms
      st.sum2
      st.var
      st.stddev
  
      with pytest.raises(AttributeError):
          st.spam()
  
      with pytest.raises(TypeError):
          ImageStat.Stat(1)
  
imports: import pytest
  from PIL import Image, ImageStat
  from .helper import hopper
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity() without return types