                           max_rules=max_rules,
                                                     cv=cv,
                                                     random_state=random_state)
    else:
        raise ValueError(&#34;Invalid alpha and max_rules passed&#34;)

    if prediction_task == &#39;regression&#39;:
        lin_model = Lasso(alpha=final_alpha,
                          random_state=random_state, max_iter=2000)
    else:
        lin_model = LogisticRegression(
            penalty=penalty, C=