def arg_types(parsed: Parsed, errors: Errors) -> Tuple[Parsed, Errors]:
func_pattern = re.compile(r"<STR_LIT>")<EOL>nsarg_pattern = re.compile(r"<STR_LIT>")<EOL>for span in parsed:<EOL><INDENT>if parsed[span]["<STR_LIT:type>"] != "<STR_LIT>" or "<STR_LIT>" not in parsed[span]:<EOL><INDENT>continue<EOL><DEDENT>for i, arg in enumerate(parsed[span]["<STR_LIT:args>"]):<EOL><INDENT>nsarg_matches = nsarg_pattern.match(arg["<STR_LIT>"])<EOL>if func_pattern.match(arg["<STR_LIT>"]):<EOL><INDENT>parsed[span]["<STR_LIT:args>"][i].update({"<STR_LIT:type>": "<STR_LIT>"})<EOL><DEDENT>elif nsarg_matches:<EOL><INDENT>(start, end) = arg["<STR_LIT>"]<EOL>ns = nsarg_matches.group(<NUM_LIT:1>)<EOL>ns_val = nsarg_matches.group(<NUM_LIT:2>)<EOL>ns_span = nsarg_matches.span(<NUM_LIT:1>)<EOL>ns_span = (ns_span[<NUM_LIT:0>] + start, ns_span[<NUM_LIT:1>] + start - <NUM_LIT:1>)<EOL>ns_val_span = nsarg_matches.span(<NUM_LIT:2>)<EOL>ns_val_span = (ns_val_span[<NUM_LIT:0>] + start, ns_val_span[<NUM_LIT:1>] + start - <NUM_LIT:1>)<EOL>parsed[span]["<STR_LIT:args>"][i].update(<EOL>{<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT>": ns,<EOL>"<STR_LIT>": ns_span,<EOL>"<STR_LIT>": ns_val,<EOL>"<STR_LIT>": ns_val_span,<EOL>}<EOL>)<EOL><DEDENT>else:<EOL><INDENT>parsed[span]["<STR_LIT:args>"][i].update({"<STR_LIT:type>": "<STR_LIT>"})<EOL><DEDENT><DEDENT><DEDENT>return parsed, errors<EOL>
Add argument types to parsed function data structure

    Args:
        parsed: function and arg locations in BEL string
        errors: error messages

    Returns:
        (parsed, errors): parsed, arguments with arg types plus error messages