in heap.py [0:0]
def dfs(self, pos):
stack = [pos]
while stack:
root = stack.pop()
yield root
child = self.left_child(root)
if child < len(self.data):
stack.append(child)
child += 1 # Right child
if child < len(self.data):
stack.append(child)