code: def _get_arrays_polygon(arr, include_z):
      # explode/flatten the Polygons into Rings
      arr_flat, ring_indices = get_rings(arr, return_index=True)
      # the offsets into the exterior/interior rings of the multipolygon parts
      offsets2 = _indices_to_offsets(ring_indices, len(arr))
  
      # the coords and offsets into the coordinates of the rings
      coords, indices = get_coordinates(
          arr_flat, return_index=True, include_z=include_z
      )
      offsets1 = np.insert(np.bincount(indices).cumsum(), 0, 0)
  
      return coords, (offsets1, offsets2)
  
file_path: shapely/shapely/_ragged_array.py
imports: import numpy
  from shapely import creation
  from shapely._geometry import GeometryType, get_coordinate_dimension, get_parts, get_rings, get_type_id
  from shapely.coordinates import get_coordinates
  from shapely.predicates import is_empty
label_desc: Use image node_id 6 for calling a global function with example usage: _get_arrays_polygon(arr, include_z) and returns: coords,  offsets1,  offsets2