code: def find_mappable(*axes):
      
      for ax in axes:
          for aset in ('collections', 'images'):
              try:
                  return getattr(ax, aset)[-1]
              except (AttributeError, IndexError):
                  continue
      raise ValueError("Cannot determine mappable layer on any axes "
                       "for this colorbar")
docs: Find the most recently added mappable layer in the given axes
  
      Parameters
      ----------
      *axes : `~matplotlib.axes.Axes`
          one or more axes to search for a mappable