code: def test_quantile_loss(
      levels: list,
      actuals: list,
      predictions: list,
      expected_loss_values: list,
      weights_fun,
  ):
      loss_function = QuantileLoss(
          levels, quantile_weights=weights_fun(levels)
      )
      loss_values = loss_function(
          mx.nd.array(actuals), mx.nd.array(predictions)
      ).asnumpy()
      assert np.allclose(expected_loss_values, loss_values)
  
imports: import mxnet
  import numpy
  import pytest
  from gluonts.mx.block.quantile_output import crps_weights_pwl, uniform_weights, QuantileLoss
label_desc: Use image node_id 1 for calling a global function with example usage: test_quantile_loss(levels, actuals, predictions, expected_loss_values, weights_fun) without return types