code: def onecmd(self, statement: Union[Statement, str]) -> bool:
          
          # For backwards compatibility with cmd, allow a str to be passed in
          if not isinstance(statement, Statement):
              statement = self._complete_statement(statement)
  
          # Check if this is a macro
          if statement.command in self.macros:
              stop = self._run_macro(statement)
          else:
              func = self.cmd_func(statement.command)
              if func:
                  # Check to see if this command should be stored in history
                  if statement.command not in self.exclude_from_history \
                          and statement.command not in self.disabled_commands:
                      self.history.append(statement)
  
                  stop = func(statement)
  
              else:
                  stop = self.default(statement)
  
          if stop is None:
              stop = False
  
          return stop
docs: This executes the actual do_* method for a command.
  
          If the command provided doesn't exist, then it executes default() instead.
  
          :param statement: intended to be a Statement instance parsed command from the input stream, alternative
                            acceptance of a str is present only for backward compatibility with cmd
          :return: a flag indicating whether the interpretation of commands should stop