code: def training_step(self, batch, batch_idx):
      # training_step defines the train loop.
      # It is independent of forward
      x, y = batch
      x = x.view(x.size(0), -1)
      z = self.encoder(x)
      x_hat = self.decoder(z)
      loss = F.mse_loss(x_hat, x)
      self.log("train_loss", loss)
      return loss
  
file_path: pytorch-lightning/docs/source-app/code_samples/convert_pl_to_app/train.py
imports: import os
  import torch
  import torch.nn.functional
  from torch import nn
  from torch.utils.data import DataLoader, random_split
  from torchvision import transforms
  from torchvision.datasets import MNIST
  import lightning.pytorch
label_desc: Use image node_id 3 for calling the LitAutoEncoder obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss