class_docstr: All trainable embeddings must inherit from BaseEmbedding.
class_docstr_tok: ["All","trainable","embeddings","must","inherit","from","BaseEmbedding","."]
code: def training_step(
      self,
      batch: Tuple[List[Tensor], Tensor, List[str]],
      batch_idx: int,
  ) -> Tensor:
      # get the two image transformations
      (x0, x1), _, _ = batch
      # forward pass of the transformations
      y0, y1 = self(x0, x1)
      # calculate loss
      loss: Tensor = self.criterion(y0, y1)
      # log loss and return
      self.log("loss", loss)
      return loss
  
imports: import copy
  import os
  from typing import Any, List, Optional, Sequence, Tuple, Union
  import omegaconf
  from omegaconf import DictConfig
  from pytorch_lightning import LightningModule, Trainer
  from pytorch_lightning.callbacks.callback import Callback
  from torch import Tensor
  from torch.nn import Module
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler
  from torch.utils.data import DataLoader
  from lightly.data.dataset import LightlyDataset
  from lightly.embedding import callbacks
  from lightly.utils.benchmarking import BenchmarkModule
label_desc: Use image node_id 3 for calling the BaseEmbedding obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss