code: def get_cb_parent_spans(cbax):
      """
      Figure out which subplotspecs this colorbar belongs to.
  
      Parameters
      ----------
      cbax : `~matplotlib.axes.Axes`
          Axes for the colorbar.
      """
      rowstart = np.inf
      rowstop = -np.inf
      colstart = np.inf
      colstop = -np.inf
      for parent in cbax._colorbar_info["parents"]:
          ss = parent.get_subplotspec()
          rowstart = min(ss.rowspan.start, rowstart)
          rowstop = max(ss.rowspan.stop, rowstop)
          colstart = min(ss.colspan.start, colstart)
          colstop = max(ss.colspan.stop, colstop)
  
      rowspan = range(rowstart, rowstop)
      colspan = range(colstart, colstop)
      return rowspan, colspan
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/_constrained_layout.py
imports: import logging
  import numpy
  from matplotlib import _api, artist
  import matplotlib.transforms
  import matplotlib._layoutgrid
label_desc: Use image node_id 10 for calling a global function with example usage: get_cb_parent_spans(cbax) and returns: rowspan,  colspan