code: def test_load_optimizer_object_tf_old(backend):
      """
      Test the _load_optimizer_config with a tensorflow optimizer config. Only run if tensorflow<2.11.
  
      We expect the returned optimizer to be an instantiated `tf.keras.optimizers.Optimizer` object.
      Also test that the loaded optimizer can be saved.
      """
      class_name = "Adam"
      learning_rate = np.float32(
          0.01
      )  # Set as float32 since this is what _save_optimizer_config returns
      epsilon = np.float32(1e-7)
      amsgrad = False
  
      # Load
      cfg_opt = {
          "class_name": class_name,
          "config": {
              "name": class_name,
              "learning_rate": learning_rate,
              "epsilon": epsilon,
              "amsgrad": amsgrad,
          },
      }
      optimizer = _load_optimizer_config(cfg_opt, backend=backend)
      # Check optimizer
      SupportedOptimizer.validate_optimizer(
          optimizer, {"backend": "tensorflow"}
      )
      assert isinstance(optimizer, tf.keras.optimizers.Optimizer)
      assert type(optimizer).__name__ == class_name
      assert optimizer.learning_rate == learning_rate
      assert optimizer.epsilon == epsilon
      assert optimizer.amsgrad == amsgrad
  
      # Save
      cfg_saved = _save_optimizer_config(optimizer)
      # Compare to original config
      for key, value in cfg_opt["config"].items():
          assert value == cfg_saved["config"][key]
  
file_path: alibi-detect/alibi_detect/saving/_tensorflow/tests/test_saving_tf.py
imports: from pytest_cases import param_fixture, parametrize, parametrize_with_cases
  import pytest
  from alibi_detect.saving.tests.datasets import ContinuousData
  from alibi_detect.saving.tests.models import encoder_model
  from alibi_detect.cd.tensorflow import HiddenOutput
  from alibi_detect.saving.loading import _load_model_config, _load_optimizer_config
  from alibi_detect.saving.saving import _path2str, _save_model_config, _save_optimizer_config
  from alibi_detect.saving.schemas import ModelConfig, SupportedOptimizer
  import tensorflow
  import numpy
  from packaging import version
label_desc: Use image node_id 2 for calling a global function with example usage: test_load_optimizer_object_tf_old(backend) without return types