def check_prediction(dframe_rules, set_features: set, the_feature: str):
    """
    Провряет, попадает ли признак the_feature в правую часть импликации ассоциативных правил,
    хранимых в строках датафрейма dframe_rules и имющих в левой части состав признаков, каждый из которых
    входит в набор set_features.

    :param dframe_rules: DataFrame of association rules
    :param set_features: Set of features for exploration
    :param the_feature: The goal feature
    :return: True if the_feature appears in consequences of the rules
    that have antecedents as a subset of set_feature, otherwise False
    """
    # searching for prediction of ~the_feature~ with antecedents ~set_features~

    i_row = 0
    is_predicted = False  # flag that indicates that the_feature appeared in consequents

    while (i_row < dframe_rules.shape[0]) and not is_predicted:
        rule = dframe_rules.iloc[i_row]
        is_predicted = rule['antecedents'].issubset(set_features) and (the_feature in rule['consequents'])
        i_row += 1

    return is_predicted