code: def imagepil_to_str(image_pil):
      output = io.BytesIO()
      image_pil.save(output, format="PNG")
      png_string = output.getvalue()
      output.close()
      return png_string
  
imports: import io
  import numpy
  import os
  import logging
  import PIL.Image
  import PIL.ImageDraw
  import PIL.ImageFont
  import tensorflow
  from .bbox_overlap import bbox_overlap
  from .bbox_transform import decode
  from base64 import b64encode
  from sys import stdout
label_desc: Use image node_id 4 for calling a global function with example usage: imagepil_to_str(image_pil) and returns: png_string