code: def setup_readline(self):
          
          readline.parse_and_bind('tab: complete')
          completer_save = readline.get_completer()
          delims_save = readline.get_completer_delims()
          delims = set(delims_save)
          delims |= self.completer_delim_includes
          delims -= self.completer_delim_excludes
          readline.set_completer(self.completer_hook)
          try:
              readline.set_completer_delims(''.join(delims))
              try:
                  yield
              finally:
                  readline.set_completer_delims(delims_save)
          finally:
              readline.set_completer(completer_save)
docs: Configure our tab completion settings for a context and then
          restore them to previous settings on exit.