code: def pot(
      self,
      dataloader,
      metric=None,
      drop_type="relative",
      maximal_drop=0.999,
      max_iter_num=1,
      n_requests=None,
      sample_size=300,
  ) -> Model:
      from openvino.tools.pot.graph import load_model, save_model
      from openvino.tools.pot.engines.ie_engine import IEEngine
      from openvino.tools.pot.pipeline.initializer import (
          create_pipeline,
      )
      from openvino.tools.pot.graph.model_utils import (
          compress_model_weights,
      )
  
      # set batch as 1 if it's dynaminc or larger than 1
      orig_shape = dict()
      static_shape = dict()
      for i, input_obj in enumerate(self.ie_network.inputs):
          orig_shape[i] = input_obj.get_partial_shape()
          shape = input_obj.get_partial_shape()
          # modify dynamic axis to 1 if it's batch dimension
          shape[0] = 1
          static_shape[i] = shape
      self.ie_network.reshape(static_shape)
  
      # pot has its own model format, so we need to save and reload by pot
      with TemporaryDirectory() as root:
          dir = Path(root)
          save(self.ie_network, str(dir / "model.xml"))
  
          # Convert model back to original shape
          self.ie_network.reshape(orig_shape)
  
          model_config = {
              "model_name": "model",
              "model": str(dir / "model.xml"),
              "weights": str(dir / "model.bin"),
          }
          model = load_model(model_config)
  
      engine_config = {
          "device": "CPU",
          "stat_requests_number": n_requests,
          "eval_requests_number": n_requests,
      }
      engine = IEEngine(
          config=engine_config, data_loader=dataloader, metric=metric
      )
  
      algorithms = [
          {
              "name": "DefaultQuantization",
              "params": {
                  "target_device": "CPU",
                  "preset": "performance",
                  "stat_subset_size": sample_size,
              },
          }
      ]
      if metric:
          algorithms = [
              {
                  "name": "AccuracyAwareQuantization",
                  "params": {
                      "target_device": "CPU",
                      "preset": "performance",
                      "stat_subset_size": sample_size,
                      "maximal_drop": maximal_drop,
                      "max_iter_num": max_iter_num,
                      "drop_type": drop_type,
                  },
              }
          ]
  
      pipeline = create_pipeline(algorithms, engine)
      compressed_model = pipeline.run(model=model)
      compress_model_weights(model=compressed_model)
  
      # To use runtime, we need to save and reload
      # returned a list of paths, but for now there is only one model path in list
      with TemporaryDirectory() as root:
          compressed_model_paths = save_model(
              model=compressed_model, save_path=root, model_name="model"
          )
          # set batch for compressed model
          model_path = compressed_model_paths[0]["model"]
          model = Core().read_model(model_path)
          model.reshape(orig_shape)
      return model
  
imports: from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import List, Union
  from openvino.runtime import Core
  from bigdl.nano.utils.common import invalidInputError, _flatten, invalidOperationError
  from openvino.runtime import Model
  from openvino.runtime import AsyncInferQueue
  import numpy
  from datetime import datetime
  from .utils import save, OpenVINO_LESS_2022_3
label_desc: Use image node_id 15 for calling the OpenVINOModel obj's underlying member method code with example usage: obj.pot(dataloader, metric, drop_type, maximal_drop, max_iter_num, n_requests, sample_size) and returns: model