code: def tf_keras_iris_explainer(request, models, iris_data):
      X_train = iris_data["X_train"]
      model, ae, enc = models
      if request.param[0]:  # use k-d trees
          ae = None
          enc = None
  
      shape = (1, 4)
      cf_explainer = CounterfactualProto(
          model,
          shape,
          gamma=100,
          theta=100,
          ae_model=ae,
          enc_model=enc,
          use_kdtree=request.param[0],
          max_iterations=1000,
          c_init=request.param[1],
          c_steps=request.param[2],
          feature_range=(
              X_train.min(axis=0).reshape(shape),
              X_train.max(axis=0).reshape(shape),
          ),
      )
      yield model, cf_explainer
      tf.keras.backend.clear_session()
  
file_path: alibi/alibi/explainers/tests/test_cfproto.py
imports: import numpy
  import pytest
  import tensorflow
  from alibi.api.defaults import DEFAULT_META_CFP, DEFAULT_DATA_CFP
  from alibi.explainers import CounterfactualProto
  from alibi.utils.mapping import ohe_to_ord, ord_to_num
label_desc: Use image node_id 1 for calling a global function with example usage: tf_keras_iris_explainer(request, models, iris_data) without return types