code: def multipolygon_generator(polygon_generator):
      """Generator for multi complex polygons.
      Usage: multipolygon_generator(n, max_per_multi)
      """
      rstate = np.random.RandomState(0)
  
      def generator(n, max_per_multi, distance_from_origin, radius):
          for _ in range(n):
              num_polygons = rstate.randint(1, max_per_multi)
              yield MultiPolygon(
                  [
                      *polygon_generator(
                          num_polygons, distance_from_origin, radius
                      )
                  ]
              )
  
      return generator
  
imports: import geopandas
  import numpy
  import pandas
  import pytest
  from shapely.affinity import rotate
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
label_desc: Use image node_id 11 for calling a global function with example usage: multipolygon_generator(polygon_generator) and returns: generator