def save_arguments(module_name, elements):
    """ Recursively save arguments name and default value. """
    for elem, signature in elements.items():
        if isinstance(signature, dict):  # Submodule case
            save_arguments(module_name + (elem,), signature)
        else:
            # use introspection to get the Python obj
            try:
                themodule = __import__(".".join(module_name))
                obj = getattr(themodule, elem)
                spec = getfullargspec(obj)
                if signature.args.args:
                    logger.warn(
                        "Overriding pythran description with argspec information for: {}".format(".".join(module_name + (elem,)))
                    )

                args = [ast.Name(arg, ast.Param(), None) for arg in spec.args]
                defaults = list(spec.defaults or [])
                if sys.version_info.major == 3:
                    args += [ast.Name(arg, ast.Param(), None) for arg in spec.kwonlyargs]
                    defaults += [spec.kwonlydefaults[kw] for kw in spec.kwonlyargs]

                # Avoid use of comprehension to fill "as much args/defauls" as
                # possible
                signature.args.args = args[:-len(defaults)]
                signature.args.defaults = []
                for arg, value in zip(args[-len(defaults):], defaults):
                    signature.args.defaults.append(to_ast(value))
                    signature.args.args.append(arg)
            except (AttributeError, ImportError, TypeError, ToNotEval):
                pass