code: def run(self, args=None):
          
          try:
              self._args = self.build_parser().parse_args(args)
              
              # Running without a subcommand will print usage.
              if self._args.cmd is None:
                  if self._args.help_options:
                      self.show_options_help()
                  else:
                      self._parser.print_help()
                  return 1
              
              # The default log level differs for some subcommands.
              self._default_log_level = DEFAULT_CMD_LOG_LEVEL[self._args.cmd]
              self._setup_logging()
              
              # Pass any options to DAPAccess.
              if hasattr(self._args, 'daparg'):
                  DAPAccess.set_args(self._args.daparg)
  
              # Invoke subcommand.
              self._COMMANDS[self._args.cmd](self)
  
              # Successful exit.
              return 0
          except KeyboardInterrupt:
              return 0
          except exceptions.Error as e:
              LOG.error(e, exc_info=Session.get_current().log_tracebacks)
          except Exception as e:
              LOG.error("uncaught exception: %s", e, exc_info=Session.get_current().log_tracebacks)
              return 1
docs: ! @brief Main entry point for command line processing.