code: def test_robustness():
      distr_out = ISQFOutput(num_pieces=10, qk_x=[0.1, 0.5, 0.9])
      args_proj = distr_out.get_args_proj()
      args_proj.initialize()
  
      net_out = mx.nd.random.normal(shape=(1000, 30), scale=1e2)
      args = args_proj(net_out)
      distr = distr_out.distribution(args)
  
      margin = mx.nd.random.normal(shape=(1000,), scale=1e2)
      x = mx.random.uniform(
          low=distr.qk_y_l - margin, high=distr.qk_y_r + margin
      )
  
      # check that 0 < cdf < 1
      cdf_x = distr.cdf(x)
      assert (
          mx.nd.min(cdf_x).asscalar() >= 0.0
          and mx.nd.max(cdf_x).asscalar() <= 1.0
      )
  
      # check that 0 <= crps
      crps_x = distr.crps(x)
      assert mx.nd.min(crps_x).asscalar() >= 0.0
  
file_path: gluonts/test/mx/distribution/test_isqf.py
imports: from typing import List, Tuple
  import mxnet
  import numpy
  import pytest
  from gluonts.core.serde import dump_json, load_json
  from gluonts.mx.distribution import ISQF, ISQFOutput
label_desc: Use image node_id 4 for calling a global function with example usage: test_robustness() without return types