code: def test_estimate_polygons_norm_type(self):
      points = [(0, 0), (10, 0), (10, 10)]
  
      ntype = normalization.estimate_polygons_norm_type(None)
      assert ntype == "None"
  
      for name, dt in zip(
          ["float", "int", "uint"], [np.float32, np.int32, np.uint16]
      ):
          ntype = normalization.estimate_polygons_norm_type(
              np.zeros((1, 2, 5, 2), dtype=dt)
          )
          assert ntype == "array[%s]" % (name,)
  
      ntype = normalization.estimate_polygons_norm_type(
          ia.Polygon(points)
      )
      assert ntype == "Polygon"
  
      ntype = normalization.estimate_polygons_norm_type(
          ia.PolygonsOnImage([ia.Polygon(points)], shape=(1, 1, 3))
      )
      assert ntype == "PolygonsOnImage"
  
      ntype = normalization.estimate_polygons_norm_type([])
      assert ntype == "iterable[empty]"
  
      for name, dt in zip(
          ["float", "int", "uint"], [np.float32, np.int32, np.uint16]
      ):
          ntype = normalization.estimate_polygons_norm_type(
              [np.zeros((5, 4), dtype=dt)]
          )
          assert ntype == "iterable-array[%s]" % (name,)
  
      ntype = normalization.estimate_polygons_norm_type(points)
      assert ntype == "iterable-tuple[number,size=2]"
  
      ntype = normalization.estimate_polygons_norm_type(
          [ia.Keypoint(x=x, y=y) for x, y in points]
      )
      assert ntype == "iterable-Keypoint"
  
      ntype = normalization.estimate_polygons_norm_type(
          [ia.Polygon(points)]
      )
      assert ntype == "iterable-Polygon"
  
      ntype = normalization.estimate_polygons_norm_type(
          [ia.PolygonsOnImage([ia.Polygon(points)], shape=(1, 1, 3))]
      )
      assert ntype == "iterable-PolygonsOnImage"
  
      ntype = normalization.estimate_polygons_norm_type([[]])
      assert ntype == "iterable-iterable[empty]"
  
      for name, dt in zip(
          ["float", "int", "uint"], [np.float32, np.int32, np.uint16]
      ):
          ntype = normalization.estimate_polygons_norm_type(
              [[np.zeros((5, 4), dtype=dt)]]
          )
          assert ntype == "iterable-iterable-array[%s]" % (name,)
  
      ntype = normalization.estimate_polygons_norm_type([points])
      assert ntype == "iterable-iterable-tuple[number,size=2]"
  
      ntype = normalization.estimate_polygons_norm_type(
          [[ia.Keypoint(x=x, y=y) for x, y in points]]
      )
      assert ntype == "iterable-iterable-Keypoint"
  
      ntype = normalization.estimate_polygons_norm_type(
          [[ia.Polygon(points)]]
      )
      assert ntype == "iterable-iterable-Polygon"
  
      ntype = normalization.estimate_polygons_norm_type([[[]]])
      assert ntype == "iterable-iterable-iterable[empty]"
  
      ntype = normalization.estimate_polygons_norm_type([[points]])
      assert ntype == "iterable-iterable-iterable-tuple[number,size=2]"
  
      ntype = normalization.estimate_polygons_norm_type(
          [[[ia.Keypoint(x=x, y=y) for x, y in points]]]
      )
      assert ntype == "iterable-iterable-iterable-Keypoint"
  
      # --
      # error cases
      # --
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type(1)
  
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type("foo")
  
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type([1])
  
      # wrong class
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type(
              ia.HeatmapsOnImage(
                  np.zeros((1, 1, 1), dtype=np.float32), shape=(1, 1, 1)
              )
          )
  
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type([[[[]]]])
  
      # list of list of list of polygons,
      # only list of list of polygons is max
      with self.assertRaises(AssertionError):
          _ntype = normalization.estimate_polygons_norm_type(
              [[[ia.Polygon(points)]]]
          )
  
imports: from __future__ import print_function, division, absolute_import
  import sys
  import numpy
  import six.moves
  import imgaug
  import imgaug.augmentables.normalization
  from imgaug.testutils import reseed
label_desc: Use image node_id 22 for calling the TestNormalization obj's underlying member method code with example usage: obj.test_estimate_polygons_norm_type() without return types