class_docstr: Order all global functions according to their callgraph depth
code: def run(self, node):
      # compute the weight of each function
      # the weight of a function is the number functions it references
      result = super(OrderedGlobalDeclarations, self).run(node)
      old_count = -1
      new_count = 0
      # iteratively propagate weights
      while new_count != old_count:
          for v in result.values():
              v.update(*[result[f] for f in v])
          old_count = new_count
          new_count = sum(len(value) for value in result.values())
      # return functions, the one with the greatest weight first
      self.result = sorted(
          self.result.keys(),
          reverse=True,
          key=lambda s: len(self.result[s]),
      )
      return self.result
  
file_path: catboost/contrib/python/pythran/pythran/analyses/ordered_global_declarations.py
imports: from pythran.analyses.aliases import StrictAliases
  from pythran.analyses.global_declarations import GlobalDeclarations
  from pythran.passmanager import ModuleAnalysis
  import gast
label_desc: Use image node_id 4 for calling the OrderedGlobalDeclarations obj's underlying member method code with example usage: obj.run(node) and returns: self