def add(self, element):
    '\n    :param an element from pcoll.\n    :return: boolean type whether the value is in the heap\n\n    Adds a value to the heap, returning whether the value is (large enough to\n    be) in the heap.\n    '
    if ((len(self._sample_heap) >= self._sample_size) and (element < self._min_hash)):
        return False
    if (element not in self._sample_set):
        self._sample_set.add(element)
        heapq.heappush(self._sample_heap, element)
        if (len(self._sample_heap) > self._sample_size):
            temp = heapq.heappop(self._sample_heap)
            self._sample_set.remove(temp)
            self._min_hash = self._sample_heap[0]
        elif (element < self._min_hash):
            self._min_hash = element
    return True
:param an element from pcoll.
:return: boolean type whether the value is in the heap

Adds a value to the heap, returning whether the value is (large enough to
be) in the heap.
def add(self, element):
    '\n    :param an element from pcoll.\n    :return: boolean type whether the value is in the heap\n\n    Adds a value to the heap, returning whether the value is (large enough to\n    be) in the heap.\n    '
    if ((len(self._sample_heap) >= self._sample_size) and (element < self._min_hash)):
        return False
    if (element not in self._sample_set):
        self._sample_set.add(element)
        heapq.heappush(self._sample_heap, element)
        if (len(self._sample_heap) > self._sample_size):
            temp = heapq.heappop(self._sample_heap)
            self._sample_set.remove(temp)
            self._min_hash = self._sample_heap[0]
        elif (element < self._min_hash):
            self._min_hash = element
    return True