code: def _save(self, path, compression="fp32"):
      path = Path(path)
      path.mkdir(exist_ok=True)
  
      self.model.save(path)
      self._dump_status(path)
  
      # save compile attr
      if self._is_compiled:
          kwargs = {
              "run_eagerly": self._run_eagerly,
              "steps_per_execution": int(self._steps_per_execution),
          }
          if self.compiled_loss is not None:
              kwargs["loss"] = self.compiled_loss._user_losses
              kwargs[
                  "loss_weights"
              ] = self.compiled_loss._user_loss_weights
          if self.compiled_metrics is not None:
              user_metric = self.compiled_metrics._user_metrics
              if user_metric is not None:
                  if isinstance(user_metric, (list, tuple)):
                      kwargs["metrics"] = [m._name for m in user_metric]
                  else:
                      kwargs["metrics"] = user_metric._name
              weighted_metrics = (
                  self.compiled_metrics._user_weighted_metrics
              )
              if weighted_metrics is not None:
                  if isinstance(weighted_metrics, (list, str)):
                      kwargs["weighted_metrics"] = [
                          m._name for m in weighted_metrics
                      ]
                  else:
                      kwargs[
                          "weighted_metrics"
                      ] = weighted_metrics._name
          with open(path / self.status["compile_path"], "wb") as f:
              SafePickle.dump(kwargs, f)
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/neural_compressor/tensorflow/model.py
imports: import os
  from bigdl.nano.utils.common import SafePickle
  import yaml
  from pathlib import Path
  from typing import Sequence, Any, Union, Dict
  from neural_compressor.model.model import TensorflowModel
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.tf import convert_all
  from bigdl.nano.tf.model import KerasOptimizedModel
  from ..core import version
label_desc: Use image node_id 6 for calling the KerasQuantizedModel obj's underlying member method code with example usage: obj._save(path, compression) without return types