code: def leaves(self):
          
          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
docs: 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::
  
              >>> from binarytree import Node
              >>>
              >>> root = Node(1)
              >>> root.left = Node(2)
              >>> root.right = Node(3)
              >>> root.left.right = Node(4)
              >>>
              >>> print(root)
              <BLANKLINE>
                __1
               /   \\
              2     3
               \\
                4
              <BLANKLINE>
              >>> root.leaves
              [Node(3), Node(4)]