code: def check_no_collapsed_axes(layoutgrids, fig):
      """
      Check that no Axes have collapsed to zero size.
      """
      for sfig in fig.subfigs:
          ok = check_no_collapsed_axes(layoutgrids, sfig)
          if not ok:
              return False
      for ax in fig.axes:
          gs = ax.get_gridspec()
          if gs in layoutgrids:  # also implies gs is not None.
              lg = layoutgrids[gs]
              for i in range(gs.nrows):
                  for j in range(gs.ncols):
                      bb = lg.get_inner_bbox(i, j)
                      if bb.width <= 0 or bb.height <= 0:
                          return False
      return True
  
file_path: matplotlib/lib/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 4 for calling a global function with example usage: check_no_collapsed_axes(layoutgrids, fig) and returns: True, False, False