def add_ast_fn(d, spec, parent_function=None):
if d["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>ast_fn = Function(d["<STR_LIT>"]["<STR_LIT:name>"], spec, parent_function=parent_function)<EOL>for arg in d["<STR_LIT:args>"]:<EOL><INDENT>if arg["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>ast_fn.add_argument(add_ast_fn(arg, spec, parent_function=ast_fn))<EOL><DEDENT>elif arg["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>ast_fn.add_argument(<EOL>NSArg(arg["<STR_LIT>"]["<STR_LIT>"], arg["<STR_LIT>"]["<STR_LIT>"], ast_fn)<EOL>)<EOL><DEDENT>elif arg["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>ast_fn.add_argument(StrArg(arg["<STR_LIT>"], ast_fn))<EOL><DEDENT><DEDENT><DEDENT>return ast_fn<EOL>
Convert dict AST to object AST Function

    Args:
        ast_fn: AST object Function
        d: AST as dictionary
        spec: BEL Specification

    Return:
        ast_fn