def METHOD_NAME(self, batch, batch_nb, train=True):  # pylint: disable=W0613
    """Common forward step between training and validation.
    The function of this method is to unpack the data given by the loader,
    forward the batch through the model and compute the loss.
    Pytorch-lightning handles all the rest.
    Args:
        batch: the object returned by the loader (a list of torch.Tensor
            in most cases) but can be something else.
        _batch_nb (int): The number of the batch in the epoch.
        _train (bool): Whether in training mode. Needed only if the training
            and validation steps are fundamentally different, otherwise,
            pytorch-lightning handles the usual differences.
    Returns:
        :class:`torch.Tensor` : The loss value on this batch.
    .. note::
        This is typically the method to overwrite when subclassing
        ``System``. If the training and validation steps are somehow
        different (except for ``loss.backward()`` and ``optimzer.step()``),
        the argument ``train`` can be used to switch behavior.
        Otherwise, ``training_step`` and ``validation_step`` can be overwriten.
    """
    inputs, targets = batch
    est_targets = self(inputs)
    loss = self.loss_func(est_targets, targets)
    return loss