code: def draw_linecollection(data, obj):
      
      content = []
  
      edgecolors = obj.get_edgecolors()
      linestyles = obj.get_linestyles()
      linewidths = obj.get_linewidths()
      paths = obj.get_paths()
  
      for i, path in enumerate(paths):
          color = edgecolors[i] if i < len(edgecolors) else edgecolors[0]
          style = linestyles[i] if i < len(linestyles) else linestyles[0]
          width = linewidths[i] if i < len(linewidths) else linewidths[0]
  
          data, options = mypath.get_draw_options(data, obj, color, None, style, width)
  
          # TODO what about masks?
          data, cont, _, _ = mypath.draw_path(
              data, path, draw_options=options, simplify=False
          )
          content.append(cont + "\n")
  
      return data, content
docs: Returns Pgfplots code for a number of patch objects.