def METHOD_NAME(self, batch: Data, batch_idx: int) -> Tensor:
    """Perform shared step.
    Applies the forward pass and the following loss calculation, shared
    between the training and validation step.
    """
    preds = self(batch)
    loss = self.compute_loss(preds, batch)
    return loss