code: def save_method(elements, module_path):
      
      for elem, signature in elements.items():
          if isinstance(signature, dict):  # Submodule case
              save_method(signature, module_path + (elem,))
          elif isinstance(signature, Class):
              save_method(signature.fields, module_path + (elem,))
          elif signature.ismethod():
              # in case of duplicates, there must be a __dispatch__ record
              # and it is the only recorded one
              if elem in methods and module_path[0] != '__dispatch__':
                  assert elem in MODULES['__dispatch__']
                  path = ('__dispatch__',)
                  methods[elem] = (path, MODULES['__dispatch__'][elem])
              else:
                  methods[elem] = (module_path, signature)
docs: Recursively save methods with module name and signature.