code: def step(self, batch: any, batch_idx: BatchIndex):
      data, target = batch[0].to(self.device), batch[1].to(self.device)
  
      if self.mode.is_train:
          tracker.add_global_step(len(data))
  
      with self.mode.update(is_log_activations=batch_idx.is_last):
          output = self.model(data)
  
      loss = self.loss_func(output, target)
      self.accuracy_func(output, target)
      tracker.add("loss.", loss)
  
      if self.mode.is_train:
          loss.backward()
  
          self.optimizer.step()
          if batch_idx.is_last:
              tracker.add("model", self.model)
          self.optimizer.zero_grad()
  
      tracker.save()
  
imports: import torch.nn
  import torch.nn.functional
  import torch.utils.data
  from labml import experiment, tracker
  from labml.configs import option
  from labml.utils import pytorch
  from labml_helpers.datasets.mnist import MNISTConfigs
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.metrics.accuracy import Accuracy
  from labml_helpers.module import Module
  from labml_helpers.seed import SeedConfigs
  from labml_helpers.train_valid import TrainValidConfigs, BatchIndex, hook_model_outputs
label_desc: Use image node_id 2 for calling the Configs obj's underlying member method code with example usage: obj.step(batch, batch_idx) without return types