code: def test_optimize_nano_model_without_accuracy_large_batch(self):
      model = MobileNetV2(
          weights=None, input_shape=[40, 40, 3], classes=10
      )
      # prepare dataset
      train_examples = np.random.random((100, 40, 40, 3))
      train_labels = np.random.randint(0, 10, size=(100,))
      train_dataset = tf.data.Dataset.from_tensor_slices(
          (train_examples, train_labels)
      )
      # prepare optimizer
      opt = InferenceOptimizer()
      opt.optimize(
          model=model,
          x=train_dataset,
          batch_size=32,
          latency_sample_num=10,
      )
      model = opt.get_best_model()
  
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 3 for calling the TestInferencePipeline obj's underlying member method code with example usage: obj.test_optimize_nano_model_without_accuracy_large_batch() without return types