@classmethod
def collapse(cls, holomap, ranges=None, mode='data'):
    """
        Given a map of Overlays, apply all applicable compositors.
        """
    if cls.definitions == []:
        return holomap
    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
