code: def test_reduce():
      with Image.open("Tests/images/test-card-lossless.jp2") as im:
          assert callable(im.reduce)
  
          im.reduce = 2
          assert im.reduce == 2
  
          im.load()
          assert im.size == (160, 120)
  
          im.thumbnail((40, 40))
          assert im.size == (40, 30)
  
imports: import os
  import re
  from io import BytesIO
  import pytest
  from PIL import Image, ImageFile, Jpeg2KImagePlugin, UnidentifiedImageError, features
  from .helper import assert_image_equal, assert_image_similar, assert_image_similar_tofile, skip_unless_feature
label_desc: Use image node_id 17 for calling a global function with example usage: test_reduce() without return types