code: def test_values(
      distr: ISQF,
      alpha: List[float],
      quantile: List[float],
      target: List[float],
      left_crps: List[float],
      right_crps: List[float],
      spline_crps: List[float],
  ):
      target = torch.tensor(target).reshape(len(target))
      alpha = torch.tensor(alpha).reshape(len(alpha), len(target))
      quantile = np.array(quantile).reshape(
          (len(quantile), len(target))
      )
  
      left_crps = np.array(left_crps)
      right_crps = np.array(right_crps)
      spline_crps = np.array(spline_crps)
  
      # Test the interpolation/extrapolation between the quantile knots
      assert all(np.isclose(distr.quantile(alpha).numpy(), quantile))
  
      # Test the crps computation
      assert all(
          np.isclose(
              distr.crps_tail(target, left_tail=True).numpy(), left_crps
          )
      )
      assert all(
          np.isclose(
              distr.crps_tail(target, left_tail=False).numpy(),
              right_crps,
          )
      )
      assert all(
          np.isclose(distr.crps_spline(target).numpy(), spline_crps)
      )
      assert all(
          np.isclose(
              distr.crps(target).numpy(),
              left_crps + right_crps + spline_crps,
          )
      )
  
file_path: gluonts/test/torch/distribution/test_torch_isqf.py
imports: from typing import List, Tuple
  import torch
  import numpy
  import pytest
  from gluonts.torch.distributions import ISQF, ISQFOutput
label_desc: Use image node_id 1 for calling a global function with example usage: test_values(distr, alpha, quantile, target, left_crps, right_crps, spline_crps) without return types