code: def train_step(engine, batch):
      model.train()
      input, target = batch[0].to(device), batch[1].to(device)
  
      optimizer.zero_grad()
      loss = criterion(model(input), target)
      loss.backward()
      optimizer.step()
  
      return loss.item()
  
imports: import argparse
  import torch
  import torch.nn
  import torch.optim
  import torchvision
  from model import Net
  from torch.utils.data import DataLoader
  from torchvision.transforms.functional import center_crop, resize, to_tensor
  from ignite.contrib.handlers import ProgressBar
  from ignite.engine import Engine, Events
  from ignite.handlers import BasicTimeProfiler
  from ignite.metrics import PSNR
label_desc: Use image node_id 1 for calling a global function with example usage: train_step(engine, batch) and returns: loss