class_docstr: Connected points
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  lineend : Literal["butt", "round", "projecting"], default="butt"
      Line end style. This option is applied for solid linetypes.
  linejoin : Literal["round", "miter", "bevel"], default="round"
      Line join style. This option is applied for solid linetypes.
  arrow : ~plotnine.geoms.geom_path.arrow, default=None
      Arrow specification. Default is no arrow.
  
  See Also
  --------
  plotnine.geoms.geom_path.arrow : for adding arrowhead(s) to paths.
class_docstr_tok: ["Connected","points","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}","lineend",":","Literal","[","``","butt","''",",","``","round","''",",","``","projecting","''","]",",","default=","''","butt","''","Line","end","style",".","This","option","is","applied","for","solid","linetypes",".","linejoin",":","Literal","[","``","round","''",",","``","miter","''",",","``","bevel","''","]",",","default=","''","round","''","Line","join","style",".","This","option","is","applied","for","solid","linetypes",".","arrow",":","~plotnine.geoms.geom_path.arrow",",","default=None","Arrow","specification",".","Default","is","no","arrow",".","See","Also","--","--","--","--","plotnine.geoms.geom_path.arrow",":","for","adding","arrowhead","(","s",")","to","paths","."]
docstr: Draw a horizontal line in the box
  
  Parameters
  ----------
  data : Series
      Data Row
  da : DrawingArea
      Canvas
  lyr : layer
      Layer
  
  Returns
  -------
  out : DrawingArea
docstr_tok: ["Draw","a","horizontal","line","in","the","box","Parameters","--","--","--","--","--","data",":","Series","Data","Row","da",":","DrawingArea","Canvas","lyr",":","layer","Layer","Returns","--","--","--","-","out",":","DrawingArea"]
code: def draw_legend(
      data: pd.Series[Any], da: DrawingArea, lyr: Layer
  ) -> DrawingArea:
      """
      Draw a horizontal line in the box
  
      Parameters
      ----------
      data : Series
          Data Row
      da : DrawingArea
          Canvas
      lyr : layer
          Layer
  
      Returns
      -------
      out : DrawingArea
      """
      from matplotlib.lines import Line2D
  
      data["size"] *= SIZE_FACTOR
      x = [0, da.width]
      y = [0.5 * da.height] * 2
      color = to_rgba(data["color"], data["alpha"])
  
      key = Line2D(
          x,
          y,
          linestyle=data["linetype"],
          linewidth=data["size"],
          color=color,
          solid_capstyle="butt",
          antialiased=False,
      )
      da.add_artist(key)
      return da
  
imports: from __future__ import annotations
  import typing
  from collections import Counter
  from contextlib import suppress
  from warnings import warn
  import numpy
  from .._utils import SIZE_FACTOR, make_line_segments, match, to_rgba
  from ..doctools import document
  from ..exceptions import PlotnineWarning
  from .geom import geom
label_desc: Use image node_id 4 for calling the geom_path obj's underlying member method code with example usage: obj.draw_legend(data, da, lyr) and returns: da