code: def _main_process(args, train_loader, val_loader, train_size):
      classifier = Classifier()
      trainer = Trainer(
          max_epochs=args.epochs,
          use_ipex=args.use_ipex,
          num_processes=args.nproc,
      )
  
      train_start = time.time()
      trainer.fit(classifier, train_loader)
      train_end = time.time()
      trainer.test(classifier, val_loader)
  
      output = json.dumps(
          {
              "config": args.name,
              "train_time": train_end - train_start,
              "train_throughput": train_size
              * args.epochs
              / (train_end - train_start),
          }
      )
  
      print(f">>>{output}<<<")
  
      return
  
file_path: BigDL/python/nano/benchmark/resnet50/pytorch-cat-dog.py
imports: import os
  import json
  import torch
  import time
  from bigdl.nano.pytorch.vision.datasets import ImageFolder
  from bigdl.nano.pytorch.vision.transforms import transforms
  import argparse
  from torch.utils.data import DataLoader
  from torchvision.datasets.utils import download_and_extract_archive
  from bigdl.nano.pytorch.vision.models import resnet50
  from bigdl.nano.pytorch.vision.models import ImageClassifier
  from bigdl.nano.pytorch import Trainer
label_desc: Use image node_id 2 for calling a global function with example usage: _main_process(args, train_loader, val_loader, train_size) without return types