code: def test_tf_eager(random_seed):
      """This is a basic eager example from keras."""
      tf = pytest.importorskip("tensorflow")
  
      tf.compat.v1.random.set_random_seed(random_seed)
      rs = np.random.RandomState(random_seed)
  
      if version.parse(tf.__version__) >= version.parse("2.4.0"):
          pytest.skip(
              "Deep explainer does not work for TF 2.4 in eager mode."
          )
  
      x = pd.DataFrame({"B": rs.random(size=(100,))})
      y = x.B
      y = y.map(lambda zz: chr(int(zz * 2 + 65))).str.get_dummies()
  
      model = tf.keras.models.Sequential()
      model.add(
          tf.keras.layers.Dense(
              10, input_shape=(x.shape[1],), activation="relu"
          )
      )
      model.add(
          tf.keras.layers.Dense(
              y.shape[1], input_shape=(10,), activation="softmax"
          )
      )
      model.summary()
      model.compile(loss="categorical_crossentropy", optimizer="Adam")
      model.fit(x.values, y.values, epochs=2)
  
      e = DeepExplainer(model, x.values[:1])
      sv = e.shap_values(x.values)
      assert (
          np.abs(
              e.expected_value[0]
              + sv[0].sum(-1)
              - model(x.values)[:, 0]
          ).max()
          < 1e-4
      )
  
file_path: shap/tests/explainers/test_deep.py
imports: import numpy
  import pandas
  import pytest
  from packaging import version
  import shap
  from shap import DeepExplainer
label_desc: Use image node_id 1 for calling a global function with example usage: test_tf_eager(random_seed) without return types