class_docstr: Quantile loss, i.e. a quantile of ``q=0.5`` will give half of the mean absolute error as it is calculated as
  
  Defined as ``max(q * (y-y_pred), (1-q) * (y_pred-y))``
code: def loss(
      self, y_pred: torch.Tensor, target: torch.Tensor
  ) -> torch.Tensor:
      # calculate quantile loss
      losses = []
      for i, q in enumerate(self.quantiles):
          errors = target - y_pred[..., i]
          losses.append(
              torch.max((q - 1) * errors, q * errors).unsqueeze(-1)
          )
      losses = 2 * torch.cat(losses, dim=2)
  
      return losses
  
file_path: pytorch-forecasting/pytorch_forecasting/metrics/quantile.py
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from pytorch_forecasting.metrics.base_metrics import MultiHorizonMetric
label_desc: Use image node_id 2 for calling the QuantileLoss obj's underlying member method code with example usage: obj.loss(y_pred, target) and returns: losses