code: def training_step(self, batch, batch_idx):
      x, y = batch
      output = self.model(x)
      loss = self.criterion(output, y)
      self.log("train_loss", loss)
      return loss
  
file_path: BigDL/python/nano/tutorial/training/pytorch-lightning/lightning_train_multi_instance.py
imports: import torch
  from torchvision import transforms
  from torchvision.datasets import OxfordIIITPet
  from torch.utils.data.dataloader import DataLoader
  import torch
  from torchvision.models import resnet18
  from bigdl.nano.pytorch import Trainer
  import pytorch_lightning
label_desc: Use image node_id 3 for calling the MyLightningModule obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss