code: def test_fkpwl_distr_output_same_as_pl():
      x = mx.nd.array([[0.1, 0.5], [0.3, 0.99], [0.2, 0.6]])
  
      gamma = mx.nd.array([0.0, 2.0])
      slopes = mx.nd.array([[0.1, 0.5, 0.9], [2.0, 0.1, 5.0]])
      knot_spacings = mx.nd.array([[0.1, 0.5, 0.4], [0.1, 0.5, 0.4]])
  
      pl_output = PiecewiseLinearOutput(num_pieces=3)
      pl_dist = pl_output.distribution([gamma, slopes, knot_spacings])
  
      fkpl = FixedKnotsPiecewiseLinearOutput(
          [0.1, 0.6],
      ).distribution([gamma, slopes, knot_spacings])
  
      assert np.allclose(
          pl_dist.crps(x).asnumpy(),
          fkpl.crps(x).asnumpy(),
      )
  
file_path: gluonts/test/mx/distribution/test_piecewise_linear.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 FixedKnotsPiecewiseLinearOutput, PiecewiseLinear, PiecewiseLinearOutput
  from gluonts.testutil import empirical_cdf
label_desc: Use image node_id 5 for calling a global function with example usage: test_fkpwl_distr_output_same_as_pl() without return types