code: def _linestrings_from_polygons(geoseries):
      """Converts the exterior and interior rings of a geoseries of polygons
      into a geoseries of linestrings."""
      xy = geoseries.polygons.xy
      parts = geoseries.polygons.part_offset.take(
          geoseries.polygons.geometry_offset
      )
      rings = geoseries.polygons.ring_offset
      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 6 for calling a global function with example usage: _linestrings_from_polygons(geoseries) and returns: cuspatial