code: def test_crps_pwl_quantile_weights(
      quantiles, true_quantile_weight
  ) -> None:
      assert len(quantiles) == len(true_quantile_weight), (
          f"length quantiles {quantiles} "
          f"and quantile_weights {true_quantile_weight} "
          "do not match."
      )
      tol = 1e-5
      quantile_weights = crps_weights_pwl(quantiles)
      assert (
          sum(
              abs(quantile_weights[i] - true_quantile_weight[i])
              for i in range(len(quantiles))
          )
          < tol
      ), "inaccurate computation of quantile weights"
  
file_path: gluonts/test/mx/model/seq2seq/test_quantile_loss.py
imports: from mxnet import nd
  import pytest
  import numpy
  from pandas import Period
  from gluonts.mx.block.quantile_output import QuantileLoss, crps_weights_pwl
  from gluonts.model.forecast import QuantileForecast
label_desc: Use image node_id 2 for calling a global function with example usage: test_crps_pwl_quantile_weights(quantiles, true_quantile_weight) without return types