code: def rescale(x, scale, method):
      s = x.size
      scale *= 0.25
      crop = (
          scale * s[0],
          scale * s[1],
          s[0] * (1 - scale),
          s[1] * (1 - scale),
      )
      methods = (
          Image.ANTIALIAS,
          Image.BICUBIC,
          Image.BILINEAR,
          Image.BOX,
          Image.HAMMING,
          Image.NEAREST,
      )
      method = methods[int(method * 5.99)]
      return x.crop(crop).resize(x.size, method)
  
imports: import random
  from collections import namedtuple
  import numpy
  from PIL import Image, ImageOps, ImageEnhance, ImageFilter
label_desc: Use image node_id 16 for calling a global function with example usage: rescale(x, scale, method) and returns: x