code: def get_image_ext(image):
      if image.shape[2] == 4:
          return ".png"
      return ".jpg"
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import cv2
  import numpy
  import pyclipper
  from PIL import ImageDraw
  from shapely.geometry import Polygon
label_desc: Use image node_id 2 for calling a global function with example usage: get_image_ext(image) and returns: str, str