code: def _linestring_from_flatcoords(coords, offsets):
      # recreate linestrings
      linestring_n = np.diff(offsets)
      linestring_indices = np.repeat(
          np.arange(len(linestring_n)), linestring_n
      )
  
      result = np.empty(len(offsets) - 1, dtype=object)
      result = creation.linestrings(
          coords, indices=linestring_indices, out=result
      )
      result[linestring_n == 0] = creation.empty(
          1, geom_type=GeometryType.LINESTRING
      ).item()
      return result
  
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 11 for calling a global function with example usage: _linestring_from_flatcoords(coords, offsets) and returns: result