'Internal helper: build a function that ties an index with each result.
Args:
indexes: A list of integers.  A value x at location y in the list means
that the result at location y in the result list needs to be at location
x in the list of results returned to the user.'

def __create_result_index_pairs(self, indexes):

    def create_result_index_pairs(results):
        return zip(results, indexes)
    return create_result_index_pairs
