docstr: Saves the model to Tensorflow SavedModel or a single HDF5 file.
  
  :param filepath: String, PathLike, path to SavedModel or H5 file to save the
         model. It can be local/hdfs/s3 filepath
  :param overwrite: Whether to silently overwrite any existing file at the
         target location, or provide the user with a manual prompt.
  :param include_optimizer: If True, save optimizer's state together.
  :param save_format: Either `'tf'` or `'h5'`, indicating whether to save the
         model to Tensorflow SavedModel or HDF5. Defaults to 'tf' in TF 2.X,
         and 'h5' in TF 1.X.
  :param signatures: Signatures to save with the SavedModel. Applicable to the
         'tf' format only. Please see the `signatures` argument in
         `tf.saved_model.save` for details.
  :param options: (only applies to SavedModel format)
         `tf.saved_model.SaveOptions` object that specifies options for
         saving to SavedModel.
code: def save(
      self,
      filepath: str,
      overwrite: bool = True,
      include_optimizer: bool = True,
      save_format: Optional[str] = None,
      signatures: Optional[str] = None,
      options: Optional["SaveOptions"] = None,
  ) -> None:
      """
      Saves the model to Tensorflow SavedModel or a single HDF5 file.
  
      :param filepath: String, PathLike, path to SavedModel or H5 file to save the
             model. It can be local/hdfs/s3 filepath
      :param overwrite: Whether to silently overwrite any existing file at the
             target location, or provide the user with a manual prompt.
      :param include_optimizer: If True, save optimizer's state together.
      :param save_format: Either `'tf'` or `'h5'`, indicating whether to save the
             model to Tensorflow SavedModel or HDF5. Defaults to 'tf' in TF 2.X,
             and 'h5' in TF 1.X.
      :param signatures: Signatures to save with the SavedModel. Applicable to the
             'tf' format only. Please see the `signatures` argument in
             `tf.saved_model.save` for details.
      :param options: (only applies to SavedModel format)
             `tf.saved_model.SaveOptions` object that specifies options for
             saving to SavedModel.
      """
      params = dict(
          filepath=filepath,
          overwrite=overwrite,
          include_optimizer=include_optimizer,
          save_format=save_format,
          signatures=signatures,
          options=options,
      )
      ray.get(
          [w.save_model.remote(**params) for w in self.remote_workers]
      )
  
imports: import os
  import types
  from bigdl.orca.common import SafePickle
  import shutil
  import tempfile
  import logging
  import ray
  from bigdl.dllib.utils import log4Error
  from bigdl.dllib.utils.file_utils import is_local_path
  from bigdl.orca.data.file import enable_multi_fs_save, enable_multi_fs_load
  from bigdl.orca.data.ray_xshards import RayXShards
  from bigdl.orca.learn.dl_cluster import RayDLCluster
  from bigdl.orca.learn.tf2.tf_runner import TFRunner
  from bigdl.orca.learn.ray_estimator import Estimator
  from bigdl.orca.learn.utils import maybe_dataframe_to_xshards, dataframe_to_xshards, convert_predict_xshards_to_dataframe, update_predict_xshards, process_xshards_of_pandas_dataframe, make_data_creator, add_predict_to_pd_xshards
  from bigdl.orca.data.file import get_remote_file_to_local, get_remote_dir_to_local, is_file
  from bigdl.orca.data.utils import process_spark_xshards
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.orca.ray import OrcaRayContext
  from typing import TYPE_CHECKING, Dict, List, Callable, Union, Optional
label_desc: Use image node_id 12 for calling the TensorFlow2Estimator obj's underlying member method code with example usage: obj.save(filepath, overwrite, include_optimizer, save_format, signatures, options) without return types