<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def leaves(self):
 """Return the leaf nodes of the binary tree. A leaf node is any node that does not have child nodes. :return: List of leaf nodes. :rtype: [binarytree.Node] **Example**: .. doctest:: <BLANKLINE> __1 / \\ 2 3 \\ 4 <BLANKLINE> [Node(3), Node(4)] """

        current_nodes = [self]
        leaves = []

        while len(current_nodes) > 0:
            next_nodes = []
            for node in current_nodes:
                if node.left is None and node.right is None:
                    leaves.append(node)
                    continue
                if node.left is not None:
                    next_nodes.append(node.left)
                if node.right is not None:
                    next_nodes.append(node.right)
            current_nodes = next_nodes
        return leaves