code: def test_quantile():
      x = torch.tensor([0.0, 1.0, 2.0])
      y = torch.rand(2000)
      z = torch.randn(2000)
  
      assert_equal(
          quantile(x, probs=[0.0, 0.4, 0.5, 1.0]),
          torch.tensor([0.0, 0.8, 1.0, 2.0]),
      )
      assert_equal(quantile(y, probs=0.2), torch.tensor(0.2), prec=0.02)
      assert_equal(
          quantile(z, probs=0.8413), torch.tensor(1.0), prec=0.02
      )
  
imports: import warnings
  import pytest
  import torch
  from pyro.ops.stats import _cummin, autocorrelation, autocovariance, crps_empirical, effective_sample_size, fit_generalized_pareto, gelman_rubin, hpdi, pi, quantile, resample, split_gelman_rubin, waic
  from tests.common import assert_close, assert_equal, xfail_if_not_implemented
label_desc: Use image node_id 2 for calling a global function with example usage: test_quantile() without return types