def _move_to_top(self, pos):
        """Move element at given position to top of queue."""
        if pos > 0:
            self.queue.rotate(-pos)
            item = self.queue.popleft()
            self.queue.rotate(pos)
            self.queue.appendleft(item)