 (y == 0))

            if self._grow_rule_obj(X, y, curr_rule) &gt;= self._grow_rule_obj(X, y, candidate_rule) or \
                    len(negative_coverage) == 0:
                stop_condition = True
            else:
                curr_rule = candidate_rule.copy()

        return curr_rule

    def _prune_rule(self, X, y, rule):
        &#34;&#34;&#34; Remove conditions from greedily built rule until
        objective does not improve
        &#34;&#34;&#34;
        stop_condition = False
        cur