code: def __init__(
      self,
      model: Model,
      loss_fn,
      optimizer_cls,
      optimizer_args,
      bigdl_type="float",
      fl_client=None,
      server_model=None,
      client_model_path=None,
      server_model_path=None,
  ):
      self.bigdl_type = bigdl_type
      self.model = model
      self.loss_fn = loss_fn
      self.optimizer = optimizer_cls(**optimizer_args)
      self.version = 0
      self.client_model_path = client_model_path
      self.server_model_path = server_model_path
      self.fl_client = (
          fl_client
          if fl_client is not None
          else NNClient(aggregator="tf")
      )
      self.loss_history = []
      if server_model is not None:
          self.__add_server_model(
              server_model, loss_fn, optimizer_cls, optimizer_args
          )
  
imports: import logging
  import os
  import shutil
  import tempfile
  from numpy import ndarray
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.ppml.fl.nn.fl_client import FLClient
  from bigdl.ppml.fl.nn.nn_client import NNClient
  from bigdl.ppml.fl.nn.utils import file_chunk_generate, print_file_size_in_dir, tensor_map_to_ndarray_map
  import tensorflow
  from tensorflow.keras.layers import Dense, Flatten, Conv2D
  from tensorflow.keras import Model
  from bigdl.ppml.fl.nn.generated.nn_service_pb2 import ByteChunk
  from nn_service_pb2 import LoadModelRequest, SaveModelRequest
label_desc: Use image node_id 1 to create a new TensorflowEstimator object  with example: obj = TensorflowEstimator(model, loss_fn, optimizer_cls, optimizer_args, bigdl_type, fl_client, server_model, client_model_path, server_model_path)