python collections deque implementation