code: def rmspe_loss(
      targets: torch.Tensor, predictions: torch.Tensor
  ) -> torch.Tensor:
      """Root mean square percentage error.
  
      Bad predictions can lead to arbitrarily large RMSPE values, especially if some values of targets are very close to
      zero. We return a large value instead of inf when (some) targets are zero.
      """
      epsilon = 1e-4
      # add epsilon if targets are zero to avoid division by zero
      denominator = targets + epsilon * (targets == 0).float()
      loss = torch.sqrt(
          torch.mean(
              ((targets - predictions).float() / denominator) ** 2
          )
      )
      return loss
  
label_desc: Use image node_id 1 for calling a global function with example usage: rmspe_loss(targets, predictions) and returns: loss