code: def get_axall_tightbbox(ax, renderer):
      """
      Get the tight_bbox of the axis ax, and any dependent decorations, like
      a `Legend` instance.
      """
  
      # main bbox of the axis....
      bbox = ax.get_tightbbox(renderer=renderer)
      # now add the possibility of the legend...
      for child in ax.get_children():
          if isinstance(child, Legend):
              bboxn = child._legend_box.get_window_extent(renderer)
              bbox = transforms.Bbox.union([bbox, bboxn])
          # add other children here....
      return bbox
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/_constrained_layout.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  import logging
  import warnings
  from matplotlib.legend import Legend
  import matplotlib.transforms
  import matplotlib._layoutbox
label_desc: Use image node_id 1 for calling a global function with example usage: get_axall_tightbbox(ax, renderer) and returns: bbox