code: def test_only_save_relevant_sizes(tmp_path):
      """Issue #2266 https://github.com/python-pillow/Pillow/issues/2266
      Should save in 16x16, 24x24, 32x32, 48x48 sizes
      and not in 16x16, 24x24, 32x32, 48x48, 48x48, 48x48, 48x48 sizes
      """
      # Arrange
      with Image.open(
          "Tests/images/python.ico"
      ) as im:  # 16x16, 32x32, 48x48
          outfile = str(tmp_path / "temp_saved_python.ico")
          # Act
          im.save(outfile)
  
      with Image.open(outfile) as im_saved:
          # Assert
          assert im_saved.info["sizes"] == {
              (16, 16),
              (24, 24),
              (32, 32),
              (48, 48),
          }
  
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 9 for calling a global function with example usage: test_only_save_relevant_sizes(tmp_path) without return types