def check_command(self, **new_attributes):
        if not self._is_parsed:
            self.parse_args()
        if not self.commands:
            raise exceptions.ArgParseInatorNoCommandsFound
        elif self._single:
            func = self._single
        else:
            if not self.args.command:
                self.parser.error("too few arguments")
            func = self.commands[self.args.command]
        if hasattr(func, '__subcommands__') and func.__subcommands__:
            command = func.__subcommands__[self.args.subcommand]
        else:
            command = func
        self.cmd_name = command.__cmd_name__
        if not self.check_auth(id(command)):
            return 0
        return self._execute(func, command, **new_attributes)