code: def load_image(filename, size=None, scale=None):
      img = Image.open(filename)
      if size is not None:
          img = img.resize((size, size), Image.LANCZOS)
      elif scale is not None:
          img = img.resize(
              (int(img.size[0] / scale), int(img.size[1] / scale)),
              Image.LANCZOS,
          )
      return img
  
imports: from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: load_image(filename, size, scale) and returns: img