code: def rotate(self, steps):
          
          popped_deque = self.pop(steps)
          if steps >= 0:
              return popped_deque.extendleft(islice(self.reverse(), steps))
  
          return popped_deque.extend(islice(self, -steps))
docs: Return deque with elements rotated steps steps.
  
          >>> x = pdeque([1, 2, 3])
          >>> x.rotate(1)
          pdeque([3, 1, 2])
          >>> x.rotate(-2)
          pdeque([3, 1, 2])