code: def test_cdf_quantile_consistency(
      batch_shape: Tuple,
      num_pieces: int,
      list_qk_x: List[float],
      num_samples: int,
      atol: float,
  ):
      distr_out = ISQFOutput(num_pieces, list_qk_x)
  
      args_proj = distr_out.get_args_proj(in_features=30)
  
      net_out = torch.normal(mean=0.0, size=(*batch_shape, 30), std=1.0)
      args = args_proj(net_out)
      distr = distr_out.distribution(args)
  
      alpha = torch.rand(size=batch_shape)
      alpha_estimate = distr.cdf(distr.quantile_internal(alpha))
  
      assert torch.max(torch.abs(alpha_estimate - alpha)) < atol
  
      y = torch.normal(mean=0.0, size=batch_shape, std=1.0)
      y_approx = distr.quantile_internal(distr.cdf(y))
  
      assert torch.max(torch.abs(y_approx - y)) < atol
  
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 3 for calling a global function with example usage: test_cdf_quantile_consistency(batch_shape, num_pieces, list_qk_x, num_samples, atol) without return types