class_docstr: Reorder top-level functions to prevent circular type dependencies.  
docstr: Keep everything but function definition then add sorted functions.
  
  Most of the time, many function sort work so we use function calldepth
  as a "sort hint" to simplify typing.
code: def visit_Module(self, node):
      """
      Keep everything but function definition then add sorted functions.
  
      Most of the time, many function sort work so we use function calldepth
      as a "sort hint" to simplify typing.
      """
      newbody = list()
      olddef = list()
      for stmt in node.body:
          if isinstance(stmt, ast.FunctionDef):
              olddef.append(stmt)
          else:
              newbody.append(stmt)
      try:
          newdef = topological_sort(
              self.type_dependencies, self.ordered_global_declarations
          )
          newdef = [f for f in newdef if isinstance(f, ast.FunctionDef)]
      except graph.Unfeasible:
          raise PythranSyntaxError("Infinite function recursion")
  
      assert set(newdef) == set(olddef), "A function have been lost..."
      node.body = newbody + newdef
      self.update = True
      return node
  
file_path: pythran/pythran/types/reorder.py
imports: import gast
  from pythran.analyses import OrderedGlobalDeclarations
  from pythran.passmanager import Transformation
  from pythran.syntax import PythranSyntaxError
  from pythran.types.type_dependencies import TypeDependencies
  import pythran.graph
label_desc: Use image node_id 3 for calling the Reorder obj's underlying member method code with example usage: obj.visit_Module(node) and returns: node