code: def _write_rgba_image(rgba, file, format):
      rgba = rgba.transpose((1, 2, 0))
      rgba = Image.fromarray(rgba, "RGBA")
      canvas = Image.new("RGBA", rgba.size, (255, 255, 255, 255))
      # Paste the image onto the canvas, using it's alpha channel as mask
      canvas.paste(rgba, mask=rgba)
      canvas.save(file, format)
  
imports: import numpy
  import tempfile
  import unittest
  from PIL import Image
  import chainer
  from chainer import testing
  from chainercv.utils import read_image
  from chainercv.utils import write_image
label_desc: Use image node_id 1 for calling a global function with example usage: _write_rgba_image(rgba, file, format) without return types