code: def _resize_pil(img, size, interpolation):
      C = img.shape[0]
      H, W = size
      out = np.empty((C, H, W), dtype=img.dtype)
      for ch, out_ch in zip(img, out):
          ch = PIL.Image.fromarray(ch, mode="F")
          out_ch[:] = ch.resize((W, H), resample=interpolation)
      return out
  
imports: import chainer
  import numpy
  import PIL
label_desc: Use image node_id 2 for calling a global function with example usage: _resize_pil(img, size, interpolation) and returns: out