code: def get_estimator(workers_per_node=1, model_fn=get_model):
      estimator = Estimator.from_torch(
          model=model_fn,
          optimizer=get_optimizer,
          loss=nn.BCELoss(),
          metrics=Accuracy(),
          config={"lr": 1e-2},
          workers_per_node=workers_per_node,
          backend="torch_distributed",
      )
      return estimator
  
imports: import os
  from unittest import TestCase
  import numpy
  import pytest
  import torch
  import torch.nn
  from zoo.orca import OrcaContext
  from zoo.orca.data.pandas import read_csv
  from zoo.orca.learn.metrics import Accuracy
  from zoo import init_nncontext
  from zoo.orca.learn.pytorch import Estimator
  from zoo.orca.data import SparkXShards
  from zoo.orca.data.image.utils import chunks
label_desc: Use image node_id 5 for calling a global function with example usage: get_estimator(workers_per_node, model_fn) and returns: estimator