code: def mode(self, mode):
      invalidInputError(
          mode in EncryptedDataFrameWriter.support_mode,
          "Unknown save mode: "
          + mode
          + "."
          + "Accepted save modes are 'overwrite', 'append', 'ignore', 'error', 'errorifexists'.",
      )
      self.df_writer = callBigDlFunc(
          self.bigdl_type, "mode", self.df_writer, mode
      )
      return self
  
imports: from bigdl.ppml.api import *
  from bigdl.ppml.utils.log4Error import *
  from enum import Enum
  from pyspark.sql import SparkSession
  from pyspark.ml.wrapper import JavaParams
label_desc: Use image node_id 3 for calling the EncryptedDataFrameWriter obj's underlying member method code with example usage: obj.mode(mode) and returns: self