class_docstr: Same as mean_weighted_quantile_loss in meta.evaluation.metrics just for pytorch
  
  Parameters
  ----------
  quantiles: The quantiles.
code: def update(
      self,
      y_pred: torch.Tensor,
      y_true: torch.Tensor,
      mask: torch.Tensor,
      scales: Optional[torch.Tensor] = None,
  ) -> None:
      if self.rescale:
          m = scales[:, 0].unsqueeze(1)
          std = scales[:, 1].unsqueeze(1)
          y_true = y_true * std + m
          y_pred = y_pred * std.unsqueeze(2) + m.unsqueeze(2)
  
      # crop y_pred to shape of y_true since the model always predicts the max prediction length
      # max prediction length might be longer than max length in the particular batch
      y_pred = y_pred[:, : y_true.size()[1], ...]
      y_true = y_true.unsqueeze(-1)
      quantile_losses = 2 * torch.sum(
          torch.abs(
              (y_pred - y_true)
              * ((y_true <= y_pred).type(torch.uint8) - self.quantiles)
          ),
          axis=-1,
      )  # shape [num_time_series, max_ts_length]
      self.denom += torch.sum(torch.abs(y_true))
      # mask out all elements that correspond to padding in y_true
      quantile_losses = torch.mul(quantile_losses, mask)
      self.quantile_losses += quantile_losses.sum() / len(
          self.quantiles
      )
  
imports: from typing import List, Optional, Callable, Any
  import torch
  from torchmetrics import Metric
label_desc: Use image node_id 2 for calling the CRPS obj's underlying member method code with example usage: obj.update(y_pred, y_true, mask, scales) without return types