<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def preorder(self):
 """Return the nodes in the binary tree using pre-order_ traversal. A pre-order_ traversal visits root, left subtree, then right subtree. .. _pre-order: https://en.wikipedia.org/wiki/Tree_traversal :return: List of nodes. :rtype: [binarytree.Node] **Example**: .. doctest:: <BLANKLINE> __1 / \\ 2 3 / \\ 4 5 <BLANKLINE> [Node(1), Node(2), Node(4), Node(5), Node(3)] """

        node_stack = [self]
        result = []

        while len(node_stack) > 0:
            node = node_stack.pop()
            result.append(node)

            if node.right is not None:
                node_stack.append(node.right)
            if node.left is not None:
                node_stack.append(node.left)

        return result