code: def find_root(node):
      
      # Scamper up to the top level namespace
      while node.type != syms.file_input:
          node = node.parent
          if not node:
              raise ValueError("root found before file_input node was found.")
      return node
docs: Find the top level namespace.