code: def create_random_polygon(height, width, seed):
      rs = np.random.RandomState(seed)
      nb_points = rs.randint(3, 50)
      coords = rs.rand(nb_points, 2)
      coords = (
          coords * 2 - 0.5
      )  # allow coords outside of the image plane
      coords[:, 0] *= width
      coords[:, 1] *= height
      poly = Polygon(coords)
      if poly.is_valid:
          return poly
  
      new_seed = rs.randint(ia.SEED_MIN_VALUE, ia.SEED_MAX_VALUE)
      return create_random_polygon(height, width, new_seed)
  
imports: from __future__ import print_function, division
  import numpy
  import imgaug
  import imgaug.augmenters
  from imgaug.augmentables.polys import Polygon, PolygonsOnImage
label_desc: Use image node_id 2 for calling a global function with example usage: create_random_polygon(height, width, seed) and returns: create_random_polygon, poly