code: def clear(self):
          
          node = self._first
          while node is not None:
              next_node = node._next
              node._list = node._prev = node._next = None
              node = next_node
          self._size = 0
docs: Remove all nodes from the list.