code: def training_step(
      self,
      batch: Tuple[List[Tensor], Tensor, List[str]],
      batch_idx: int,
  ) -> Tensor:
      momentum = cosine_schedule(
          step=self.trainer.global_step,
          max_steps=self.trainer.estimated_stepping_batches,
          start_value=0.99,
          end_value=1.0,
      )
      update_momentum(self.backbone, self.backbone_momentum, m=momentum)
      update_momentum(
          self.projection_head,
          self.projection_head_momentum,
          m=momentum,
      )
  
      # Forward pass and loss calculation.
      views, targets = batch[0], batch[1]
  
      features = self.forward(views[0]).flatten(start_dim=1)
      projections = self.projection_head(features)
  
      # momentum encoder network
      projections_momentum = self.forward_momentum(views[1])
  
      loss = self.criterion(projections, projections_momentum)
  
      self.log(
          "train_loss",
          loss,
          prog_bar=True,
          sync_dist=True,
          batch_size=len(targets),
      )
  
      # Online linear evaluation.
      cls_loss, cls_log = self.online_classifier.training_step(
          (features.detach(), targets), batch_idx
      )
      self.log_dict(cls_log, sync_dist=True, batch_size=len(targets))
      return loss + cls_loss
  
imports: import copy
  from typing import List, Tuple
  import torch
  from pytorch_lightning import LightningModule
  from torch import Tensor
  from torch.nn import Identity
  from torchvision.models import resnet50
  from lightly.loss.tico_loss import TiCoLoss
  from lightly.models.modules.heads import TiCoProjectionHead
  from lightly.models.utils import deactivate_requires_grad, get_weight_decay_parameters, update_momentum
  from lightly.transforms import BYOLTransform
  from lightly.utils.benchmarking import OnlineLinearClassifier
  from lightly.utils.lars import LARS
  from lightly.utils.scheduler import CosineWarmupScheduler, cosine_schedule
label_desc: Use image node_id 4 for calling the TiCo obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: unknown