code: def training_step(self, batch, batch_idx: int):
      x, y = batch
  
      logits = self(x)
  
      loss = self.loss_fn(logits, y)
      accuracy_train = accuracy(
          logits.argmax(-1),
          y,
          num_classes=10,
          task="multiclass",
          top_k=1,
      )
  
      return {"loss": loss, "accuracy": accuracy_train}
  
file_path: pytorch-lightning/examples/fabric/build_your_own_trainer/run.py
imports: import lightning
  import torch
  from torchmetrics.functional.classification.accuracy import accuracy
  from trainer import MyCustomTrainer
label_desc: Use image node_id 3 for calling the MNISTModule obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: dict