code: def mock_process(data_train, target, client_id, upload_server_model):
      init_fl_context(client_id, target)
      # set new_fl_client to True will create a FLClient with new ID for multi-party test
      df_train = pd.read_csv(os.path.join(resource_path, data_train))
      if "Outcome" in df_train:
          df_x = df_train.drop("Outcome", 1)
          df_y = df_train["Outcome"]
      else:
          df_x = df_train
          df_y = None
      x = df_x.to_numpy(dtype="float32")
      y = (
          np.expand_dims(df_y.to_numpy(dtype="float32"), axis=1)
          if df_y is not None
          else None
      )
  
      model = LogisticRegressionNetwork1(len(df_x.columns))
      set_one_like_parameter(model)
      loss_fn = nn.BCELoss()
      server_model = (
          LogisticRegressionNetwork2() if upload_server_model else None
      )
      logging.info("Creating FL Pytorch Estimator")
      ppl = Estimator.from_torch(
          client_model=model,
          loss_fn=loss_fn,
          optimizer_cls=torch.optim.SGD,
          optimizer_args={"lr": 1e-3},
          server_model=server_model,
      )
      logging.info("Starting training")
      response = ppl.fit(x, y)
      result = ppl.predict(x)
      logging.info(response)
      return ppl
  
imports: import multiprocessing
  import threading
  from multiprocessing import Process
  import unittest
  import numpy
  import pandas
  import os
  import torch
  from bigdl.ppml.fl.nn.fl_context import init_fl_context
  from bigdl.ppml.fl.nn.pytorch.utils import set_one_like_parameter
  from bigdl.ppml.fl.nn.fl_server import FLServer
  from torch import Tensor, nn
  import logging
  from bigdl.ppml.fl.estimator import Estimator
  from bigdl.ppml.fl.utils import FLTest
  from typing import List
label_desc: Use image node_id 1 for calling a global function with example usage: mock_process(data_train, target, client_id, upload_server_model) and returns: ppl