code: def run_in_terminal(cls, handler, render_cli_done=False):
          
          def _handler(cli, buffer):
              cli.run_in_terminal(lambda: handler(cli, buffer), render_cli_done=render_cli_done)
          return AcceptAction(handler=_handler)
docs: Create an :class:`.AcceptAction` that runs the given handler in the
          terminal.
  
          :param render_cli_done: When True, render the interface in the 'Done'
                  state first, then execute the function. If False, erase the
                  interface instead.