def __depth_visitor_run(self, visitor):
    """
      Needs to traverse the entire tree structure of declaration objects, to execute
      the visitor over them.
    """
    logger.debug("Execute visitor on: %s, main_module=%s", visitor, self.main_module)

    cache = set()
    is_class_visitor = isinstance(visitor, ClassVisitor)
    stack = [self.main_module]
    while stack:
      current = stack.pop()
      children = current.children
      logger.debug("Visit children: %s", children)
      for child in children:
        if not child:
          continue
        if (is_class_visitor and isinstance(child, TypeDeclaration))      \
        or (not is_class_visitor and isinstance(child, MethodDeclaration)):
          if cache in child:
            continue
          visitor.visit(child)
          cache.add(child)
        stack.insert(0, child)
dataset/ETHPy150Open neuroo/equip/equip/bytecode/code.py/BytecodeObject.__depth_visitor_run/swapped operands of `in`