code: def test_save_IG(ig_explainer, ffn_classifier, iris_data):
      X = iris_data["X_test"]
      target = iris_data["y_test"]
      exp0 = ig_explainer.explain(X, target=target)
  
      with tempfile.TemporaryDirectory() as temp_dir:
          ig_explainer.save(temp_dir)
          ig_explainer1 = load_explainer(
              temp_dir, predictor=ffn_classifier
          )
  
          assert isinstance(ig_explainer1, IntegratedGradients)
  
          # need to remove the layer entry since it can be a callable.
          # Although the callable are identical, they have different addresses in memory
          layer = ig_explainer.meta["params"]["layer"]
          layer1 = ig_explainer1.meta["params"]["layer"]
          del ig_explainer.meta["params"]["layer"]
          del ig_explainer1.meta["params"]["layer"]
  
          # compare metadata
          assert ig_explainer.meta == ig_explainer1.meta
  
          # compare layers
          if callable(layer):
              assert layer.__code__ == layer1.__code__
          else:
              assert layer == layer1
  
          # insert layers back in case the `ig_explainer` will be used in the future
          ig_explainer.meta["params"]["layer"] = layer
          ig_explainer1.meta["params"]["layer"] = layer1
  
          exp1 = ig_explainer.explain(X, target=target)
          assert exp0.meta == exp1.meta
  
          # IG is deterministic
          assert np.all(exp0.attributions[0] == exp1.attributions[0])
  
imports: import numbers
  import sys
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from sklearn.linear_model import LogisticRegression
  from sklearn.ensemble import RandomForestClassifier
  import tempfile
  import tensorflow
  from typing import List, Union
  from alibi.explainers import ALE, AnchorImage, AnchorTabular, AnchorText, IntegratedGradients, KernelShap, TreeShap, CounterfactualRLTabular, GradientSimilarity
  from alibi.explainers.integrated_gradients import LayerState
  from alibi.saving import load_explainer
  from alibi_testing.data import get_adult_data, get_iris_data, get_movie_sentiment_data
  import alibi_testing
  from alibi.utils.download import spacy_model
  from alibi.explainers.tests.utils import predict_fcn
label_desc: Use image node_id 23 for calling a global function with example usage: test_save_IG(ig_explainer, ffn_classifier, iris_data) without return types