code: def _open_polygon_rings(geoseries):
      """Converts a geoseries of polygons into a geoseries of linestrings
      by opening the rings of each polygon."""
      x = geoseries.polygons.x
      y = geoseries.polygons.y
      parts = geoseries.polygons.part_offset.take(
          geoseries.polygons.geometry_offset
      )
      rings_mask = geoseries.polygons.ring_offset - 1
      rings_mask[0] = 0
      mask = _true_series(len(x))
      mask[rings_mask[1:]] = False
      x = x[mask]
      y = y[mask]
      xy = cudf.DataFrame({"x": x, "y": y}).interleave_columns()
      rings = geoseries.polygons.ring_offset - cp.arange(
          len(rings_mask)
      )
      return cuspatial.GeoSeries.from_linestrings_xy(
          xy,
          rings,
          parts,
      )
  
imports: import cupy
  import numpy
  import cudf
  import cuspatial
  from cuspatial.core._column.geocolumn import ColumnType
  from cuspatial.core._column.geometa import Feature_Enum
label_desc: Use image node_id 20 for calling a global function with example usage: _open_polygon_rings(geoseries) and returns: cuspatial