parameters: (self, position)
docstring: rotate linked list from given position
docstring_summary: rotate linked list from given position
docstring_tokens: rotate linked list from given position
function: def rotate(self, position):
          """ rotate linked list from given position """
          node_ptr = self.head
          last_ptr = self.head
  
          while position > 1:
              node_ptr = node_ptr.next
              position -= 1
  
          while last_ptr.next is not None:
              last_ptr = last_ptr.next
  
          last_ptr.next = self.head
          self.head = node_ptr.next
          node_ptr.next = None
function_tokens: def rotate ( self , position ) : node_ptr = self . head last_ptr = self . head while position > 1 : node_ptr = node_ptr . next position -= 1 while last_ptr . next is not None : last_ptr = last_ptr . next last_ptr . next = self . head self . head = node_ptr . next node_ptr . next = None