async def METHOD_NAME(
    value: object, path: Union[str, os.PathLike[str]], overwrite: bool = False
) -> None:
  """Writes `value` to `path` using the SavedModel format."""
  py_typecheck.check_type(path, (str, os.PathLike))
  py_typecheck.check_type(overwrite, bool)
  def _write_saved_model(
      value: object, path: Union[str, os.PathLike[str]], overwrite: bool = False
  ) -> None:
    if isinstance(path, os.PathLike):
      path = os.fspath(path)
    # Create a temporary directory.
    temp_path = f'{path}_temp{random.randint(1000, 9999)}'
    if tf.io.gfile.exists(temp_path):
      tf.io.gfile.rmtree(temp_path)
    tf.io.gfile.makedirs(temp_path)
    # Wrap leaf values to `tf.Variable` so that they are serialized separately,
    # instead of as a single large proto.
    def _wrap_as_variable(value: _T) -> Union[tf.Variable, _T]:
      try:
        return tf.Variable(initial_value=value)
      except ValueError:
        return value
    value = structure_utils.map_structure(_wrap_as_variable, value)
    # Write to the temporary directory.
    module = _ValueModule(value)
    tf.saved_model.save(module, temp_path, signatures={})
    # Rename the temporary directory to the final location atomically.
    if tf.io.gfile.exists(path):
      if not overwrite:
        raise FileAlreadyExistsError(f'File already exists for path: {path}')
      tf.io.gfile.rmtree(path)
    tf.io.gfile.rename(temp_path, path)
  loop = asyncio.get_running_loop()
  await loop.run_in_executor(None, _write_saved_model, value, path, overwrite)