def __Get(self):
    while True:
      n = self._downq
      m = None
      while n is not None:
        if n.index < 0:
          # The node has been discarded.
          n = n.downq
          if m is None:
            self._downq = n
          else:
            m.downq = n
        elif n.channel.state == ChannelState.Open:
          # The node was resurrected, mark it back up
          n.load -= self.Penalty
          ep = n.endpoint
          Heap.FixUp(self._heap, n.index)
          o = n.downq
          n.downq = None
          n = o
          if m is None:
            self._downq = n
          else:
            m.downq = n
          self._log.info('Marking node %s up' % str(ep))
        else:
          # No change, move to the next node in the linked list
          m, n = n, n.downq

      n = self._heap[1]
      if n.channel.state == ChannelState.Open or n.load >= 0:
        return n
      else:
        # Node is now down
        n.downq = self._downq
        self._downq = n
        n.load += self.Penalty
        Heap.FixDown(self._heap, 1, self._size)
        self._OnNodeDown(n)
        self._log.warning('Marking node %s down' % str(n.endpoint))
        # Loop
Are two geometrical entities similar.
dataset/ETHPy150Open steveniemitz/scales/scales/loadbalancer/heap.py/HeapBalancerSink.__Get--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/geometry/util.py/are_similar