docs: def bel_completion(
      belstr: str,
      cursor_loc: int = -1,
      bel_version: str = default_bel_version,
      bel_comp: str = None,
      bel_fmt: str = "medium",
      species_id: str = None,
      size: int = 20,
  ) -> Mapping[str, Any]:
      """BEL Completion
  
      Args:
          belstr (str): BEL String to provide completion for
          cursor_loc (int): cursor location - default of -1 means end of string
          bel_version (str): BEL Language version to use for completion
          bel_comp (str): ['subject', 'object', 'full', None] - a nested statement has to be found in object or full statement
          bel_fmt (str): ['short', 'medium', 'long'] BEL function/relation format
          species_id (str): optional, species id is used to filter namespace values if applicable (e.g. Gene, RNA, ... entity_types)
          size: how many completions to return, defaults to 20
  
      Returns:
          Mapping[str, Any]:
              {
                  'completions': completions,
                  'function_help': function_help,
                  'entity_spans': spans
              }
      """
  
      """
      Completion object: {
          completions: [
              {
                  'replacement': <replacement text field string,
                  'cursor_loc': <new cursor location>
                  'highlight': <highlighted match>
                  'label': <label for completion>
              },
          ],
          function_help: [{
              "function_summary": <template>,
              "argument_help": [<argument help>],
              "description": <desc>
          }],
          "entity_spans": {<span info>}
      }
  
      """
      bel_spec = bel_specification.get_specification(bel_version)
  
      belstrlen = len(belstr)
      if cursor_loc == -1:
          cursor_loc = belstrlen - 1
      elif cursor_loc >= belstrlen:
          cursor_loc = belstrlen - 1
  
      # with timy.Timer() as timer:
      #     (completion_text, completions, function_help, spans) = get_completions(belstr, cursor_loc, bel_spec, bel_comp, bel_fmt, species_id, size)
  
      (completion_text, completions, function_help, spans) = get_completions(
          belstr, cursor_loc, bel_spec, bel_comp, bel_fmt, species_id, size
      )
  
      return {
          "completion_text": completion_text,
          "completions": completions,
          "function_help": function_help,
          "entity_spans": spans,
      }