vot&#39;]
        )

        output = np.where(eval(logic))
        return output[0]

    def _rule_predict(self, X, rule):
        &#34;&#34;&#34; return all indices for which the passed rule holds on X &#34;&#34;&#34;

        preds = np.zeros(X.shape[0])
        positive_cases = set(range(X.shape[0]))

        for condition in rule:
            outputs = set(list(self._condition_classify(X, condition)))
            positive_cases = positive_cases.intersection(outputs)

        preds[list(positive_cases)]