code: def benchmark_step(state):
      optimizer.zero_grad()
      output = model(data)
      loss = F.cross_entropy(output, target)
      loss.backward()
      optimizer.step()
  
      state.batch += 1
      if state.batch == args.num_batches_per_commit:
          state.batch = 0
          state.commit()
  
file_path: horovod/examples/elastic/pytorch/pytorch_synthetic_benchmark_elastic.py
imports: import argparse
  import torch.backends.cudnn
  import torch.nn.functional
  import torch.optim
  import torch.utils.data.distributed
  from torchvision import models
  import horovod.torch
  import timeit
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: benchmark_step(state) without return types