code: def test_sanity():
      def convert(im, mode):
          out = im.convert(mode)
          assert out.mode == mode
          assert out.size == im.size
  
      modes = (
          "1",
          "L",
          "LA",
          "P",
          "PA",
          "I",
          "F",
          "RGB",
          "RGBA",
          "RGBX",
          "CMYK",
          "YCbCr",
          "HSV",
      )
  
      for input_mode in modes:
          im = hopper(input_mode)
          for output_mode in modes:
              convert(im, output_mode)
  
          # Check 0
          im = Image.new(input_mode, (0, 0))
          for output_mode in modes:
              convert(im, output_mode)
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image
  from .helper import assert_image, assert_image_equal, assert_image_similar, hopper
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity() without return types