def METHOD_NAME(self):
    """Where multiple associations describe the same pair of objects, combine them into one.
    This is only implemented for pairs with a time_range attribute - others will be skipped
    """
    to_remove = set()
    for (assoc1, assoc2) in combinations(self.associations, 2):
        if not (len(assoc1.objects) == 2 and len(assoc2.objects) == 2) or \
                not(hasattr(assoc1, 'time_range') and hasattr(assoc2, 'time_range')):
            continue
        if assoc1.objects == assoc2.objects:
            if isinstance(assoc1.time_range, CompoundTimeRange):
                assoc1.time_range.add(assoc2.time_range)
                to_remove.add(assoc2)
            elif isinstance(assoc2.time_range, CompoundTimeRange):
                assoc2.time_range.add(assoc1.time_range)
                to_remove.add(assoc1)
            else:
                assoc1.time_range = CompoundTimeRange([assoc1.time_range, assoc2.time_range])
                to_remove.add(assoc2)
    for assoc in to_remove:
        self.remove(assoc)