code: def _psnrb_update(
      preds: Tensor, target: Tensor, block_size: int = 8
  ) -> Tuple[Tensor, Tensor, Tensor]:
      """Updates and returns variables required to compute peak signal-to-noise ratio.
  
      Args:
          preds: Predicted tensor
          target: Ground truth tensor
          block_size: Integer indication the block size
  
      """
      sum_squared_error = torch.sum(torch.pow(preds - target, 2))
      num_obs = tensor(target.numel(), device=target.device)
      bef = _compute_bef(preds, block_size=block_size)
      return sum_squared_error, bef, num_obs
  
imports: import math
  from typing import Tuple
  import torch
  from torch import Tensor, tensor
label_desc: Use image node_id 3 for calling a global function with example usage: _psnrb_update(preds, target, block_size) and returns: sum_squared_error,  bef,  num_obs