code: def test_optimizer_save_load(self):
      model = MobileNetV2(
          weights=None, input_shape=[40, 40, 3], classes=10
      )
      # prepare dataset
      train_examples = np.random.random((100, 40, 40, 3))
      # save load for original model
      output1 = model(train_examples)
      with tempfile.TemporaryDirectory() as tmp_dir_name:
          InferenceOptimizer.save(model, tmp_dir_name)
          load_model = InferenceOptimizer.load(tmp_dir_name, model)
          output2 = load_model(train_examples)
          np.testing.assert_almost_equal(
              output1.numpy(), output2.numpy(), decimal=5
          )
  
file_path: BigDL/python/nano/test/tf/inference/test_inf_optimizer.py
imports: from unittest import TestCase
  import tensorflow
  import tempfile
  import os
  from bigdl.nano.tf.keras import InferenceOptimizer
  import numpy
  from tensorflow.keras.applications import MobileNetV2
  from tensorflow.keras import layers, Model
label_desc: Use image node_id 7 for calling the TestInferencePipeline obj's underlying member method code with example usage: obj.test_optimizer_save_load() without return types