code: def dfs_inorder(self, reverse=False):
          
          stack = deque()
          visited = set()
          visited.add(self)
          if reverse:
              stack.append(self.childs[0])
              stack.append(self)
              stack.extend(self.childs[1:])
          else:
              stack.extend(self.childs[1:])
              stack.append(self)
              stack.append(self.childs[0])
          while stack:
              node = stack.pop()
              if node in visited or not node.childs:
                  yield node
              else:
                  stack.append(node)
                  visited.add(node)
                  if hasattr(node, "childs"):
                      if reverse:
                          stack.extend(node.childs)
                      else:
                          stack.extend(node.childs[::-1])
docs: Generator that returns each element of the tree in Inorder order.
          Keyword arguments:
          reverse -- if true, the search is done from right to left.