code: def keras_mnist_cf_explainer(request, models):
      cf_explainer = Counterfactual(
          predict_fn=models[0],
          shape=(1, 28, 28, 1),
          target_class=request.param,
          lam_init=1e-1,
          max_iter=1000,
          max_lam_steps=10,
      )
      yield models[0], cf_explainer
      tf.keras.backend.clear_session()
  
file_path: alibi/alibi/explainers/tests/test_counterfactual.py
imports: import pytest
  import numpy
  from sklearn.datasets import load_iris
  from sklearn.linear_model import LogisticRegression
  import tensorflow
  from alibi.api.defaults import DEFAULT_META_CF, DEFAULT_DATA_CF
  from alibi.explainers.counterfactual import _define_func
  from alibi.explainers import Counterfactual
label_desc: Use image node_id 3 for calling a global function with example usage: keras_mnist_cf_explainer(request, models) without return types