Check if 'was passed a valid action in the command line and if so,
        executes it by passing parameters and returning the result.

        :return: (Any) Return the result of the called function, if provided,
                 or None.

def check_command(self, **new_attributes):
        """
        Check if 'was passed a valid action in the command line and if so,
        executes it by passing parameters and returning the result.

        :return: (Any) Return the result of the called function, if provided,
                 or None.
        """
        # let's parse arguments if we didn't before.
        if not self._is_parsed:
            self.parse_args()
        if not self.commands:
            # if we don't have commands raise an Exception
            raise exceptions.ArgParseInatorNoCommandsFound
        elif self._single:
            # if we have a single function we get it directly
            func = self._single
        else:
            if not self.args.command:
                self.parser.error("too few arguments")
            # get the right command
            func = self.commands[self.args.command]

        if hasattr(func, '__subcommands__') and func.__subcommands__:
            # if we have subcommands get the command from them
            command = func.__subcommands__[self.args.subcommand]
        else:
            # else the command IS the function
            command = func
        # get the command name
        self.cmd_name = command.__cmd_name__
        # check authorization
        if not self.check_auth(id(command)):
            return 0
        # let's execute the command.
        return self._execute(func, command, **new_attributes)