def get_completions(<EOL>belstr: str,<EOL>cursor_loc: int,<EOL>bel_spec: BELSpec,<EOL>bel_comp: str,<EOL>bel_fmt: str,<EOL>species_id: str,<EOL>size: int,<EOL>):
ast, errors = pparse.get_ast_dict(belstr)<EOL>spans = pparse.collect_spans(ast)<EOL>completion_text = "<STR_LIT>"<EOL>completions = []<EOL>function_help = []<EOL>log.debug(f"<STR_LIT>")<EOL>cursor_results = cursor(belstr, ast, cursor_loc)<EOL>log.debug(f"<STR_LIT>")<EOL>if not cursor_results:<EOL><INDENT>log.debug("<STR_LIT>")<EOL>return (completion_text, completions, function_help, spans)<EOL><DEDENT>completion_text = cursor_results.get("<STR_LIT>", "<STR_LIT>")<EOL>replace_span = cursor_results["<STR_LIT>"]<EOL>namespace = cursor_results.get("<STR_LIT>", None)<EOL>if "<STR_LIT>" in cursor_results:<EOL><INDENT>parent_function = cursor_results["<STR_LIT>"]<EOL>function_help = bel_specification.get_function_help(<EOL>cursor_results["<STR_LIT>"], bel_spec<EOL>)<EOL>args = cursor_results.get("<STR_LIT:args>", [])<EOL>arg_idx = cursor_results.get("<STR_LIT>")<EOL>replace_list = arg_completions(<EOL>completion_text,<EOL>parent_function,<EOL>args,<EOL>arg_idx,<EOL>bel_spec,<EOL>bel_fmt,<EOL>species_id,<EOL>namespace,<EOL>size,<EOL>)<EOL><DEDENT>elif cursor_results["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>function_list = None<EOL>replace_list = function_completions(<EOL>completion_text, bel_spec, function_list, bel_fmt, size<EOL>)<EOL><DEDENT>elif cursor_results["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>replace_list = relation_completions(completion_text, bel_spec, bel_fmt, size)<EOL><DEDENT>completions.extend(<EOL>add_completions(replace_list, belstr, replace_span, completion_text)<EOL>)<EOL>return completion_text, completions, function_help, spans<EOL>
Get BEL Assertion completions

    Args:

    Results: