class_docstr: Legend guide
  
  Parameters
  ----------
  nrow : int, default=None
      Number of rows of legends.
  ncol : int, default=None
      Number of columns of legends.
  byrow : bool, default=False
      Whether to fill the legend row-wise or column-wise.
  keywidth : float, default=None
      Width of the legend key.
  keyheight : float, default=None
      Height of the legend key.
  kwargs : dict
      Parameters passed on to [](`~plotnine.guides.guide`).
docstr: Merge overlapped guides
  
  For example:
  
  ```python
  from ggplot import *
  p = (
      ggplot(aes(x='cut', fill='cut', color='cut'), data=diamonds)
      + stat_bin()
  )
  ```
  
  Would create similar guides for fill and color where only
  a single guide would do
docstr_tok: ["Merge","overlapped","guides","For","example",":","``","`","python","from","ggplot","import","*","p","=","(","ggplot","(","aes","(","x='cut","'",",","fill='cut","'",",","color='cut","'",")",",","data=diamonds",")","+","stat_bin","(",")",")","``","`","Would","create","similar","guides","for","fill","and","color","where","only","a","single","guide","would","do"]
code: def merge(self, other):
      """
      Merge overlapped guides
  
      For example:
  
      ```python
      from ggplot import *
      p = (
          ggplot(aes(x='cut', fill='cut', color='cut'), data=diamonds)
          + stat_bin()
      )
      ```
  
      Would create similar guides for fill and color where only
      a single guide would do
      """
      self.key = self.key.merge(other.key)
      duplicated = set(self.override_aes) & set(other.override_aes)
      if duplicated:
          warn("Duplicated override_aes is ignored.", PlotnineWarning)
      self.override_aes.update(other.override_aes)
      for ae in duplicated:
          del self.override_aes[ae]
      return self
  
imports: from __future__ import annotations
  import hashlib
  import types
  import typing
  from contextlib import suppress
  from itertools import islice
  from warnings import warn
  import numpy
  import pandas
  from .._utils import SIZE_FACTOR, remove_missing
  from ..exceptions import PlotnineError, PlotnineWarning
  from ..geoms import geom_text
  from ..mapping.aes import rename_aesthetics
  from .guide import guide
label_desc: Use image node_id 2 for calling the guide_legend obj's underlying member method code with example usage: obj.merge(other) and returns: self