code: def generate_random_shapely_feature(
      size: Integral,
      has_z: bool = False,
      obj_type: Test_Feature_Enum = None,
  ):
      obj_type = obj_type.value if obj_type else np.random.randint(1, 7)
      if obj_type == 1:
          return Point(np.random.random(2))
      else:
          if obj_type == 2:
              points = np.random.random(size * 2).reshape(size, 2)
              return MultiPoint(points)
          elif obj_type == 3:
              points = np.random.random(size * 2).reshape(size, 2)
              return LineString(points)
          elif obj_type == 4:
              num_lines = np.random.randint(
                  3, np.ceil(np.sqrt(size)) + 3
              )
              points = np.random.random(num_lines * size * 2).reshape(
                  num_lines, size, 2
              )
              return MultiLineString(tuple(points))
          elif obj_type == 5:
              return random_polygon(size)
          elif obj_type == 6:
              return random_multipolygon(size)
  
imports: from enum import Enum
  from numbers import Integral
  import cupy
  import geopandas
  import numpy
  import pandas
  import pytest
  from geopandas.testing import assert_geoseries_equal
  from shapely.affinity import rotate
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
  import cudf
  from cudf.testing import assert_series_equal
  import cuspatial
label_desc: Use image node_id 3 for calling a global function with example usage: generate_random_shapely_feature(size, has_z, obj_type) and returns: Point, MultiPoint, LineString, MultiLineString, random_polygon, random_multipolygon