code: def save(self, model_path: str, encoding: str = "utf-8") -> str:
      pathlib.Path(model_path).mkdir(exist_ok=True, parents=True)
      model_path = os.path.abspath(model_path)
  
      with open(
          os.path.join(model_path, "model_config.json"),
          "w",
          encoding=encoding,
      ) as f:
          f.write(
              json.dumps(self.to_dict(), indent=2, ensure_ascii=False)
          )
          f.close()
  
      self.embedding.embed_model.save_weights(
          os.path.join(model_path, "embed_model_weights.h5")
      )
      self.tf_model.save_weights(os.path.join(model_path, "model_weights.h5"))  # type: ignore
      logger.info(
          "model saved to {}".format(os.path.abspath(model_path))
      )
      return model_path
  
file_path: Kashgari/kashgari/tasks/abs_task_model.py
imports: import json
  import os
  import pathlib
  from abc import ABC, abstractmethod
  from typing import TYPE_CHECKING, Any, Dict, Union
  import tensorflow
  import kashgari
  from kashgari.embeddings import ABCEmbedding
  from kashgari.layers import KConditionalRandomField
  from kashgari.logger import logger
  from kashgari.processors.abc_processor import ABCProcessor
  from kashgari.utils import load_data_object
label_desc: Use image node_id 4 for calling the ABCTaskModel obj's underlying member method code with example usage: obj.save(model_path, encoding) and returns: model_path