code: def train_model(model, X, y, epochs=10, learning_rate=0.05):
      criterion = crypten.nn.CrossEntropyLoss()
  
      for epoch in range(epochs):
          model.zero_grad()
          output = model(X)
          loss = criterion(output, y)
          print(f"epoch {epoch} loss: {loss.get_plain_text()}")
          loss.backward()
          model.update_parameters(learning_rate)
      return model
  
file_path: CrypTen/pycon-workshop-2020/training_across_parties.py
imports: import sys
  import crypten
  import torch
  import torchvision
  from multiprocess_launcher import MultiProcessLauncher
label_desc: Use image node_id 3 for calling a global function with example usage: train_model(model, X, y, epochs, learning_rate) and returns: model