code: def train(
      ctx: Context,
      dataset=None,
      model=None,
      optimizer=None,
      loss_func=None,
      args: TrainingArguments = None,
  ):
      if ctx.is_on_guest:
          trainer = HeteroNNTrainerGuest(
              ctx=ctx,
              model=model,
              train_set=dataset,
              optimizer=optimizer,
              loss_fn=loss_func,
              training_args=args,
          )
      else:
          trainer = HeteroNNTrainerHost(
              ctx=ctx,
              model=model,
              train_set=dataset,
              optimizer=optimizer,
              training_args=args,
          )
  
      trainer.train()
      return trainer
  
file_path: FATE/examples/launchers/sshe_nn_launcher.py
imports: import torch
  from fate.arch import Context
  from fate.ml.nn.hetero.hetero_nn import HeteroNNTrainerGuest, HeteroNNTrainerHost, TrainingArguments
  from fate.ml.nn.model_zoo.hetero_nn_model import HeteroNNModelGuest, HeteroNNModelHost
  from fate.ml.nn.model_zoo.hetero_nn_model import SSHEArgument
label_desc: Use image node_id 1 for calling a global function with example usage: train(ctx, dataset, model, optimizer, loss_func, args) and returns: trainer