code: def multipoint_generator(point_generator):
      """Generator for n multipoints. Usage: mp=generator(n, max_num_points)"""
      rstate = np.random.RandomState(0)
  
      def generator(n, max_num_geometries):
          for _ in range(n):
              num_geometries = rstate.randint(1, max_num_geometries)
              yield MultiPoint([*point_generator(num_geometries)])
  
      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 6 for calling a global function with example usage: multipoint_generator(point_generator) and returns: generator