code: def training_step(self, batch, batch_idx):
      views = batch[0]
      features = [self.forward(view) for view in views]
      zs = torch.stack([z for z, _ in features])
      ps = torch.stack([p for _, p in features])
  
      loss = 0.0
      for i in range(len(views)):
          mask = torch.arange(len(views), device=self.device) != i
          loss += self.criterion(
              ps[i], torch.mean(zs[mask], dim=0)
          ) / len(views)
  
      self.log("train_loss_ssl", loss)
      return loss
  
file_path: lightly/examples/pytorch_lightning_distributed/fastsiam.py
imports: import pytorch_lightning
  import torch
  import torchvision
  from torch import nn
  from lightly.loss import NegativeCosineSimilarity
  from lightly.models.modules import SimSiamPredictionHead, SimSiamProjectionHead
  from lightly.transforms import FastSiamTransform
label_desc: Use image node_id 3 for calling the FastSiam obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss