def convert_fus(ast):
parent_fn_name = ast.name_short<EOL>prefix_list = {"<STR_LIT:p>": "<STR_LIT>", "<STR_LIT:r>": "<STR_LIT>", "<STR_LIT:g>": "<STR_LIT>"}<EOL>prefix = prefix_list[parent_fn_name]<EOL>fus1_ns = ast.args[<NUM_LIT:0>].namespace<EOL>fus1_val = ast.args[<NUM_LIT:0>].value<EOL>arg_fus = ast.args[<NUM_LIT:1>]<EOL>fus_args = [None, "<STR_LIT:?>", "<STR_LIT:?>"]<EOL>for idx, arg in enumerate(arg_fus.args):<EOL><INDENT>fus_args[idx] = arg<EOL><DEDENT>fus2_ns = fus_args[<NUM_LIT:0>].namespace<EOL>fus2_val = fus_args[<NUM_LIT:0>].value<EOL>if fus_args[<NUM_LIT:1>] == "<STR_LIT:?>":<EOL><INDENT>fus1_range = fus_args[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>fus1_range = f'<STR_LIT>'<EOL><DEDENT>if fus_args[<NUM_LIT:2>] == "<STR_LIT:?>":<EOL><INDENT>fus2_range = fus_args[<NUM_LIT:2>]<EOL><DEDENT>else:<EOL><INDENT>fus2_range = f'<STR_LIT>'<EOL><DEDENT>fus = Function("<STR_LIT>", spec, parent_function=ast)<EOL>fus.args = [<EOL>NSArg(fus1_ns, fus1_val, fus),<EOL>StrArg(fus1_range, fus),<EOL>NSArg(fus2_ns, fus2_val, fus),<EOL>StrArg(fus2_range, fus),<EOL>]<EOL>ast_args = ast.args<EOL>ast_args.pop(<NUM_LIT:0>)<EOL>ast_args.pop(<NUM_LIT:0>)<EOL>if ast_args == [None]:<EOL><INDENT>ast_args = []<EOL><DEDENT>ast.args = []<EOL>ast.add_argument(fus)<EOL>if len(ast_args) > <NUM_LIT:0>:<EOL><INDENT>ast.args.extend(ast_args)<EOL><DEDENT>return ast<EOL>
Convert BEL1 fus() to BEL2 fus()