code: def runcmds_plus_hooks(self, cmds: List[str]) -> bool:
          
          stop = False
          self.cmdqueue = list(cmds) + self.cmdqueue
          try:
              while self.cmdqueue and not stop:
                  line = self.cmdqueue.pop(0)
                  if self.echo and line != 'eos':
                      self.poutput('{}{}'.format(self.prompt, line))
  
                  stop = self.onecmd_plus_hooks(line)
          finally:
              # Clear out the command queue and script directory stack, just in
              # case we hit an error and they were not completed.
              self.cmdqueue = []
              self._script_dir = []
              # NOTE: placing this return here inside the finally block will
              # swallow exceptions. This is consistent with what is done in
              # onecmd_plus_hooks and _cmdloop, although it may not be
              # necessary/desired here.
              return stop
docs: Convenience method to run multiple commands by onecmd_plus_hooks.
  
          This method adds the given cmds to the command queue and processes the
          queue until completion or an error causes it to abort. Scripts that are
          loaded will have their commands added to the queue. Scripts may even
          load other scripts recursively. This means, however, that you should not
          use this method if there is a running cmdloop or some other event-loop.
          This method is only intended to be used in "one-off" scenarios.
  
          NOTE: You may need this method even if you only have one command. If
          that command is a load, then you will need this command to fully process
          all the subsequent commands that are loaded from the script file. This
          is an improvement over onecmd_plus_hooks, which expects to be used
          inside of a command loop which does the processing of loaded commands.
  
          Example: cmd_obj.runcmds_plus_hooks(['load myscript.txt'])
  
          :param cmds: command strings suitable for onecmd_plus_hooks.
          :return: True implies the entire application should exit.