code: def buildmodules(lst):
      cfuncs.buildcfuncs()
      outmess("Building modules...\n")
      modules, mnames, isusedby = [], [], {}
      for i in range(len(lst)):
          if "__user__" in lst[i]["name"]:
              cb_rules.buildcallbacks(lst[i])
          else:
              if "use" in lst[i]:
                  for u in lst[i]["use"].keys():
                      if u not in isusedby:
                          isusedby[u] = []
                      isusedby[u].append(lst[i]["name"])
              modules.append(lst[i])
              mnames.append(lst[i]["name"])
      ret = {}
      for i in range(len(mnames)):
          if mnames[i] in isusedby:
              outmess(
                  '\tSkipping module "%s" which is used by %s.\n'
                  % (
                      mnames[i],
                      ",".join(
                          ['"%s"' % s for s in isusedby[mnames[i]]]
                      ),
                  )
              )
          else:
              um = []
              if "use" in modules[i]:
                  for u in modules[i]["use"].keys():
                      if u in isusedby and u in mnames:
                          um.append(modules[mnames.index(u)])
                      else:
                          outmess(
                              '\tModule "%s" uses nonexisting "%s" which will be ignored.\n'
                              % (mnames[i], u)
                          )
              ret[mnames[i]] = {}
              dict_append(
                  ret[mnames[i]], rules.buildmodule(modules[i], um)
              )
      return ret
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import pprint
  import re
  from .None import crackfortran
  from .None import rules
  from .None import cb_rules
  from .None import auxfuncs
  from .None import cfuncs
  from .None import f90mod_rules
  from .None import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: buildmodules(lst) and returns: ret