class_docstr: Guides for each scale
  
  Used to assign a particular guide to an aesthetic(s).
  
  Parameters
  ----------
  kwargs : dict
      aesthetic - guide pairings. e.g
      ```python
      guides(color=guide_colorbar())
      ```
class_docstr_tok: ["Guides","for","each","scale","Used","to","assign","a","particular","guide","to","an","aesthetic","(","s",")",".","Parameters","--","--","--","--","--","kwargs",":","dict","aesthetic","-","guide","pairings",".","e.g","``","`","python","guides","(","color=guide_colorbar","(",")",")","``","`"]
docstr: Put together all the guide boxes
  
  Parameters
  ----------
  gboxes : list
      List of :class:`~matplotlib.offsetbox.Offsetbox`,
      where each item is a legend for a single aesthetic.
  gdefs : list of guide_legend|guide_colorbar
      guide definitions
  theme : theme
      Plot theme
  
  Returns
  -------
  box : OffsetBox
      A box than can be placed onto a plot
docstr_tok: ["Put","together","all","the","guide","boxes","Parameters","--","--","--","--","--","gboxes",":","list","List","of",":","class",":","`","~matplotlib.offsetbox.Offsetbox","`",",","where","each","item","is","a","legend","for","a","single","aesthetic",".","gdefs",":","list","of","guide_legend|guide_colorbar","guide","definitions","theme",":","theme","Plot","theme","Returns","--","--","--","-","box",":","OffsetBox","A","box","than","can","be","placed","onto","a","plot"]
code: def assemble(self, gboxes, gdefs, theme):
      """
      Put together all the guide boxes
  
      Parameters
      ----------
      gboxes : list
          List of :class:`~matplotlib.offsetbox.Offsetbox`,
          where each item is a legend for a single aesthetic.
      gdefs : list of guide_legend|guide_colorbar
          guide definitions
      theme : theme
          Plot theme
  
      Returns
      -------
      box : OffsetBox
          A box than can be placed onto a plot
      """
      from matplotlib.offsetbox import HPacker, VPacker
  
      # place the guides according to the guide.order
      # 0 do not sort
      # 1-99 sort
      for gdef in gdefs:
          if gdef.order == 0:
              gdef.order = 100
          elif not 0 <= gdef.order <= 99:
              raise PlotnineError(
                  "'order' for a guide should be " "between 0 and 99"
              )
      orders = [gdef.order for gdef in gdefs]
      idx = np.argsort(orders)
      gboxes = [gboxes[i] for i in idx]
  
      # direction when more than legend
      if self.box_direction == "vertical":
          packer = VPacker
      elif self.box_direction == "horizontal":
          packer = HPacker
      else:
          raise PlotnineError(
              "'legend_box' should be either "
              "'vertical' or 'horizontal'"
          )
  
      box = packer(
          children=gboxes,
          align=self.box_align,  # type: ignore
          pad=self.box_margin,
          sep=self.spacing,
      )
      return box
  
imports: from __future__ import annotations
  import typing
  from copy import deepcopy
  from warnings import warn
  import numpy
  import pandas
  from .._utils.registry import Registry
  from ..exceptions import PlotnineError, PlotnineWarning
  from .guide import guide
label_desc: Use image node_id 9 for calling the guides obj's underlying member method code with example usage: obj.assemble(gboxes, gdefs, theme) and returns: box