code: def test_skip_horizontal(self):
      # Can skip resize for one dimension
      im = hopper()
  
      for flt in [Image.NEAREST, Image.BICUBIC]:
          for size, box in [
              ((40, 50), (0, 0, 40, 90)),
              ((40, 50), (0, 20, 40, 90)),
              ((40, 50), (10, 0, 50, 90)),
              ((40, 50), (10, 20, 50, 90)),
          ]:
              res = im.resize(size, flt, box)
              assert res.size == size
              # Borders should be slightly different
              assert_image_similar(
                  res,
                  im.crop(box).resize(size, flt),
                  0.4,
                  f">>> {size} {box} {flt}",
              )
  
imports: from contextlib import contextmanager
  import pytest
  from PIL import Image, ImageDraw
  from .helper import assert_image_equal, assert_image_similar, hopper, mark_if_feature_version
label_desc: Use image node_id 8 for calling the TestCoreResampleBox obj's underlying member method code with example usage: obj.test_skip_horizontal() without return types