def get_ast_dict(belstr, component_type: str = "<STR_LIT>"):
errors = []<EOL>parsed = {}<EOL>bels = list(belstr)<EOL>char_locs, errors = parse_chars(bels, errors)<EOL>parsed, errors = parse_functions(belstr, char_locs, parsed, errors)<EOL>parsed, errors = parse_args(bels, char_locs, parsed, errors)<EOL>parsed, errors = arg_types(parsed, errors)<EOL>parsed, errors = parse_relations(belstr, char_locs, parsed, errors)<EOL>parsed, errors = parse_nested(bels, char_locs, parsed, errors)<EOL>errors = parsed_top_level_errors(parsed, errors)<EOL>ast, errors = parsed_to_ast(parsed, errors, component_type=component_type)<EOL>return ast, errors<EOL>
Convert BEL string to AST dictionary

    Args:
        belstr: BEL string
        component_type: Empty string or 'subject' or 'object' to indicate that we
            are parsing the subject or object field input