code: def forward_hook(self, module, input, output):
      residue, forecast, target, bc_mask, fc_mask = output
      offset = self._buffers["offset"]
      scale = self._buffers["scale"]
      rescaled_residue = residue * scale.unsqueeze(dim=2)
      rescaled_forecast = forecast * scale.unsqueeze(
          dim=2
      ) + offset.unsqueeze(dim=2)
      module.residue = rescaled_residue
      module.forecast = rescaled_forecast
      if self.rescale_loss:
          target = target * scale + offset
          residue = rescaled_residue
          forecast = rescaled_forecast
      return residue, forecast, target, bc_mask, fc_mask
  
imports: from typing import TYPE_CHECKING, Optional
  import torch
  from torch import Tensor, BoolTensor
  from torch.nn import functional
label_desc: Use image node_id 3 for calling the ZScoreNormalizer obj's underlying member method code with example usage: obj.forward_hook(module, input, output) and returns: residue,  forecast,  target,  bc_mask,  fc_mask