code: def test_scale():
      # Test the scaling function
      i = hopper("L").resize((50, 50))
  
      with pytest.raises(ValueError):
          ImageOps.scale(i, -1)
  
      newimg = ImageOps.scale(i, 1)
      assert newimg.size == (50, 50)
  
      newimg = ImageOps.scale(i, 2)
      assert newimg.size == (100, 100)
  
      newimg = ImageOps.scale(i, 0.5)
      assert newimg.size == (25, 25)
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageDraw, ImageOps, ImageStat, features
  from .helper import assert_image_equal, assert_image_similar, assert_image_similar_tofile, assert_tuple_approx_equal, hopper
label_desc: Use image node_id 11 for calling a global function with example usage: test_scale() without return types