code: def test_resize(self, scale, epsilon_scale, resample, epsilon):
      im = self._test_image()
  
      size_up = int(round(im.width * scale)), int(
          round(im.height * scale)
      )
      matrix_up = [1 / scale, 0, 0, 0, 1 / scale, 0, 0, 0]
      matrix_down = [scale, 0, 0, 0, scale, 0, 0, 0]
  
      transformed = im.transform(
          size_up, self.transform, matrix_up, resample
      )
      transformed = transformed.transform(
          im.size, self.transform, matrix_down, resample
      )
      assert_image_similar(transformed, im, epsilon * epsilon_scale)
  
imports: from __future__ import annotations
  import math
  import pytest
  from PIL import Image, ImageTransform
  from .helper import assert_image_equal, assert_image_similar, hopper
label_desc: Use image node_id 3 for calling the TestImageTransformAffine obj's underlying member method code with example usage: obj.test_resize(scale, epsilon_scale, resample, epsilon) without return types