class_docstr: Base class of all Geoms
class_docstr_tok: ["Base","class","of","all","Geoms"]
docstr: Draw a rectangle in the box
  
  Parameters
  ----------
  data :
      A of the data plotted to this layer
  da :
      Canvas on which to draw
  lyr :
      Layer that the geom belongs to.
  
  Returns
  -------
  :
      The DrawingArea after a layer has been drawn onto it.
docstr_tok: ["Draw","a","rectangle","in","the","box","Parameters","--","--","--","--","--","data",":","A","of","the","data","plotted","to","this","layer","da",":","Canvas","on","which","to","draw","lyr",":","Layer","that","the","geom","belongs","to",".","Returns","--","--","--","-",":","The","DrawingArea","after","a","layer","has","been","drawn","onto","it","."]
code: def draw_legend(
      data: pd.Series[Any], da: DrawingArea, lyr: Layer
  ) -> DrawingArea:
      """
      Draw a rectangle in the box
  
      Parameters
      ----------
      data :
          A of the data plotted to this layer
      da :
          Canvas on which to draw
      lyr :
          Layer that the geom belongs to.
  
      Returns
      -------
      :
          The DrawingArea after a layer has been drawn onto it.
      """
      msg = "The geom should implement this method."
      raise NotImplementedError(msg)
  
imports: from __future__ import annotations
  import typing
  from abc import ABC
  from copy import deepcopy
  from itertools import chain, repeat
  from .._utils import copy_keys, data_mapping_as_kwargs, is_list_like, remove_missing
  from .._utils.registry import Register, Registry
  from ..exceptions import PlotnineError
  from ..layer import layer
  from ..mapping.aes import is_valid_aesthetic, rename_aesthetics
  from ..mapping.evaluation import evaluate
  from ..positions.position import position
  from ..stats.stat import stat
label_desc: Use image node_id 15 for calling the geom obj's underlying member method code with example usage: obj.draw_legend(data, da, lyr) without return types