code: def linestrings_to_path(multi):
      
      # append to result as we go
      entities = []
      vertices = []
  
      if not util.is_sequence(multi):
          multi = [multi]
  
      for line in multi:
          # only append geometry with points
          if hasattr(line, 'coords'):
              coords = np.array(line.coords)
              if len(coords) < 2:
                  continue
              entities.append(Line(np.arange(len(coords)) +
                                   len(vertices)))
              vertices.extend(coords)
  
      kwargs = {'entities': np.array(entities),
                'vertices': np.array(vertices)}
      return kwargs
docs: Load shapely LineString objects into a trimesh.path.Path2D object
  
      Parameters
      -------------
      multi : shapely.geometry.LineString or MultiLineString
        Input 2D geometry
  
      Returns
      -------------
      kwargs : dict
        Keyword arguments for Path2D constructor