Compares the given two instances of DocumentProducers.
        
        Based on the orderby query items and whether the sort order
        is Ascending or Descending compares the peek result of
        the two DocumentProducers.
        
        If the peek results are equal based on the sort order, this
        comparator compares the target partition key range of the 
        two DocumentProducers.
        
        :param _DocumentProducer doc_producers1:
             first instance
        :param _DocumentProducer doc_producers2:
             first instance
        
        :return:
            Integer value of compare result.
                positive integer if doc_producers1 > doc_producers2
                negative integer if doc_producers1 < doc_producers2
        :rtype: int

def compare(self, doc_producer1, doc_producer2):
        """Compares the given two instances of DocumentProducers.
        
        Based on the orderby query items and whether the sort order
        is Ascending or Descending compares the peek result of
        the two DocumentProducers.
        
        If the peek results are equal based on the sort order, this
        comparator compares the target partition key range of the 
        two DocumentProducers.
        
        :param _DocumentProducer doc_producers1:
             first instance
        :param _DocumentProducer doc_producers2:
             first instance
        
        :return:
            Integer value of compare result.
                positive integer if doc_producers1 > doc_producers2
                negative integer if doc_producers1 < doc_producers2
        :rtype: int
        """
        
        res1 = self._peek_order_by_items(doc_producer1.peek())
        res2 = self._peek_order_by_items(doc_producer2.peek())
        
        self._validate_orderby_items(res1, res2)

        for i in xrange(len(res1)):
            res = _OrderByHelper.compare(res1[i], res2[i])
            if (res != 0):
                if self._sort_order[i] == 'Ascending':
                    return res
                elif self._sort_order[i] == 'Descending':
                    return -res

        return _PartitionKeyRangeDocumentProduerComparator.compare(self, doc_producer1, doc_producer2)