code: def _run_macro(self, statement: Statement) -> bool:
          
          from itertools import islice
  
          if statement.command not in self.macros.keys():
              raise KeyError('{} is not a macro'.format(statement.command))
  
          macro = self.macros[statement.command]
  
          # Make sure enough arguments were passed in
          if len(statement.arg_list) < macro.minimum_arg_count:
              self.perror("The macro '{}' expects at least {} argument(s)".format(statement.command,
                                                                                  macro.minimum_arg_count),
                          traceback_war=False)
              return False
  
          # Resolve the arguments in reverse and read their values from statement.argv since those
          # are unquoted. Macro args should have been quoted when the macro was created.
          resolved = macro.value
          reverse_arg_list = sorted(macro.arg_list, key=lambda ma: ma.start_index, reverse=True)
  
          for arg in reverse_arg_list:
              if arg.is_escaped:
                  to_replace = '{{' + arg.number_str + '}}'
                  replacement = '{' + arg.number_str + '}'
              else:
                  to_replace = '{' + arg.number_str + '}'
                  replacement = statement.argv[int(arg.number_str)]
  
              parts = resolved.rsplit(to_replace, maxsplit=1)
              resolved = parts[0] + replacement + parts[1]
  
          # Append extra arguments and use statement.arg_list since these arguments need their quotes preserved
          for arg in islice(statement.arg_list, macro.minimum_arg_count, None):
              resolved += ' ' + arg
  
          # Run the resolved command
          return self.onecmd_plus_hooks(resolved)
docs: Resolve a macro and run the resulting string
  
          :param statement: the parsed statement from the command line
          :return: a flag indicating whether the interpretation of commands should stop