def takewhile(self, func=None):
func = _make_callable(func)<EOL>return Collection(takewhile(func, self._items))<EOL>
Return a new Collection with the last few items removed.

Parameters:

    func : function(Node) -> Node

Returns:

    A new Collection, discarding all items
    at and after the first item where bool(func(item)) == False

Examples:

    node.find_all('tr').takewhile(Q.find_all('td').count() > 3)