def set_custom_completer(self, completer, pos=0) -> None:
    'Adds a new custom completer function.\n\n        The position argument (defaults to 0) is the index in the completers\n        list where you want the completer to be inserted.\n\n        `completer` should have the following signature::\n\n            def completion(self: Completer, text: string) -> List[str]:\n                raise NotImplementedError\n\n        It will be bound to the current Completer instance and pass some text\n        and return a list with current completions to suggest to the user.\n        '
    newcomp = types.MethodType(completer, self.Completer)
    self.Completer.custom_matchers.insert(pos, newcomp)
Adds a new custom completer function.

The position argument (defaults to 0) is the index in the completers
list where you want the completer to be inserted.

`completer` should have the following signature::

    def completion(self: Completer, text: string) -> List[str]:
        raise NotImplementedError

It will be bound to the current Completer instance and pass some text
and return a list with current completions to suggest to the user.
def set_custom_completer(self, completer, pos=0) -> None:
    'Adds a new custom completer function.\n\n        The position argument (defaults to 0) is the index in the completers\n        list where you want the completer to be inserted.\n\n        `completer` should have the following signature::\n\n            def completion(self: Completer, text: string) -> List[str]:\n                raise NotImplementedError\n\n        It will be bound to the current Completer instance and pass some text\n        and return a list with current completions to suggest to the user.\n        '
    newcomp = types.MethodType(completer, self.Completer)
    self.Completer.custom_matchers.insert(pos, newcomp)