<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_to_category(self, category, name, action):
 """ Adds given action to given category. :param category: Category to store the action. :type category: unicode :param name: Action name. :type name: unicode :param action: Action object. :type action: QAction :return: Method success. :rtype: bool """


        category = self.get_category(category, vivify=True)
        if not isinstance(category, dict):
            return False

        category[name] = action
        LOGGER.debug("> Added '{0}' action to '{1}' category!".format(category, name))
        return True