code: def test_save_to_bytes_bmp(mode):
      output = io.BytesIO()
      im = hopper(mode)
      im.save(
          output, "ico", bitmap_format="bmp", sizes=[(32, 32), (64, 64)]
      )
  
      # The default image
      output.seek(0)
      with Image.open(output) as reloaded:
          assert reloaded.info["sizes"] == {(32, 32), (64, 64)}
  
          assert "RGBA" == reloaded.mode
          assert (64, 64) == reloaded.size
          assert reloaded.format == "ICO"
          im = (
              hopper(mode)
              .resize((64, 64), Image.LANCZOS)
              .convert("RGBA")
          )
          assert_image_equal(reloaded, im)
  
      # The other one
      output.seek(0)
      with Image.open(output) as reloaded:
          reloaded.size = (32, 32)
  
          assert "RGBA" == reloaded.mode
          assert (32, 32) == reloaded.size
          assert reloaded.format == "ICO"
          im = (
              hopper(mode)
              .resize((32, 32), Image.LANCZOS)
              .convert("RGBA")
          )
          assert_image_equal(reloaded, im)
  
file_path: pillow-simd/Tests/test_file_ico.py
imports: import io
  import pytest
  from PIL import IcoImagePlugin, Image, ImageDraw
  from .helper import assert_image_equal, assert_image_equal_tofile, hopper
label_desc: Use image node_id 6 for calling a global function with example usage: test_save_to_bytes_bmp(mode) without return types