Given the sorted ranges and a collection,
        Returns the list of overlapping partition key ranges
        
        :param str collection_link:
            The collection link.
        :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges.
        :return:
            List of partition key ranges.
        :rtype: list of dict
        :raises ValueError: If two ranges in sorted_ranges overlap or if the list is not sorted

def get_overlapping_ranges(self, collection_link, sorted_ranges):
        '''
        Given the sorted ranges and a collection,
        Returns the list of overlapping partition key ranges
        
        :param str collection_link:
            The collection link.
        :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges.
        :return:
            List of partition key ranges.
        :rtype: list of dict
        :raises ValueError: If two ranges in sorted_ranges overlap or if the list is not sorted
        '''
        
        # validate if the list is non-overlapping and sorted
        if not self._is_sorted_and_non_overlapping(sorted_ranges):
            raise ValueError("the list of ranges is not a non-overlapping sorted ranges")
        
        target_partition_key_ranges = []
        
        it = iter(sorted_ranges)
        try:
            currentProvidedRange = next(it)
            while True:
                if (currentProvidedRange.isEmpty()):
                    # skip and go to the next item\
                    currentProvidedRange = next(it)
                    continue
                
                if len(target_partition_key_ranges):
                    queryRange = self._subtract_range(currentProvidedRange, target_partition_key_ranges[-1])
                else:
                    queryRange = currentProvidedRange
    
                overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange)
                assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange))
                target_partition_key_ranges.extend(overlappingRanges)

                lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1])
                
                # the overlapping ranges must contain the requested range
                assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange)
                
                # the current range is contained in target_partition_key_ranges just move forward
                currentProvidedRange = next(it)
                
                while currentProvidedRange.max <= lastKnownTargetRange.max:
                    # the current range is covered too. just move forward
                    currentProvidedRange = next(it)
        except StopIteration:
            # when the iteration is exhausted we get here. There is nothing else to be done
            pass
        
        return target_partition_key_ranges