code: def quantile_percent_error(
      preds: Tensor, target: Tensor, percentage: float
  ) -> Tensor:
      qe = quantile_error(preds, target, percentage)
      qpe = qe * 2 / target
      qpe = qpe.masked_fill_(target <= 0, 0.0)
      return qpe
  
file_path: gluonts/src/gluonts/nursery/daf/tslib/metrics/metrics.py
imports: import torch
  from torch import Tensor, BoolTensor
  from torch.nn.functional import l1_loss, mse_loss
  from torch.distributions import Distribution, Normal
label_desc: Use image node_id 2 for calling a global function with example usage: quantile_percent_error(preds, target, percentage) and returns: qpe