def METHOD_NAME(self, query) -> bool:
    """
    Checks if query.data appropriates to specified config
    :param query: telebot.types.CallbackQuery
    :type query: telebot.types.CallbackQuery
    :return: True if query.data appropriates to specified config
    :rtype: bool
    """
    try:
        data = self.factory.parse(query.data)
    except ValueError:
        return False
    for key, value in self.config.items():
        if isinstance(value, (list, tuple, set, frozenset)):
            if data.get(key) not in value:
                return False
        elif data.get(key) != value:
            return False
    return True