code: def is_poly(segm):
      assert isinstance(
          segm, (list, dict)
      ), "Invalid segm type: {}".format(type(segm))
      return isinstance(segm, list)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import random
  import math
  import cv2
label_desc: Use image node_id 16 for calling a global function with example usage: is_poly(segm) and returns: isinstance