code: def collapse(cls, holomap, ranges=None, mode='data'):
          
          # No potential compositors
          if cls.definitions == []:
              return holomap
  
          # Apply compositors
          clone = holomap.clone(shared_data=False)
          data = zip(ranges[1], holomap.data.values()) if ranges else holomap.data.items()
          for key, overlay in data:
              clone[key] = cls.collapse_element(overlay, ranges, mode)
          return clone
docs: Given a map of Overlays, apply all applicable compositors.