code: def test_normal_onside_upper_tail_truncated():
      hd_mean = 2.0
      hd_std = 1.0
      hard_clip_min = None
      hard_clip_max = 2.5
      hd = Normal(
          hd_mean,
          hd_std,
          hard_clip_min=hard_clip_min,
          hard_clip_max=hard_clip_max,
      )
  
      samples = hd_rvs_many(hd)
  
      samples_mean = np.abs(np.mean(samples))
      assert 1.4 < samples_mean < 1.6
      samples_std = np.std(samples)
      assert 0.6 < samples_std < 0.8
      assert abs(hd.pdf(-1.0) - 0.006409383965359982) < 1e-6
      assert abs(hd.pdf(1.8) - 0.5655298962361072) < 1e-6
      assert abs(hd.pdf(2.0) - 0.5769543579652687) < 1e-6
      assert abs(hd.pdf(2.5) - 0.5091604338370336) < 1e-6
      assert abs(hd.pdf(2.6) - 0.0) < 1e-6
      assert abs(hd.cdf(-1.0) - 0.0019522361765567414) < 1e-6
      assert abs(hd.cdf(1.8) - 0.6084788605670465) < 1e-6
      assert abs(hd.cdf(2.0) - 0.723105053423659) < 1e-6
      assert abs(hd.cdf(2.5) - 1.0) < 1e-6
      assert abs(hd.cdf(2.6) - 1.0) < 1e-6
  
      assert np.all(np.array(samples) <= hard_clip_max)
      assert hd.min() == -np.inf
      assert hd.max() == hard_clip_max
      assert abs(hd.mean() - 1.4908395661629665) < 1e-6
      assert abs(hd.var() - 0.486175435696367) < 1e-6
      assert abs(hd.std() - 0.6972628168032245) < 1e-6
      # Verify that hd mean and variance also correspond to mean and variance of sampling.
      assert abs(hd.mean() - np.mean(samples)) < 1e-2
      assert abs(hd.var() - np.var(samples)) < 1e-2
  
imports: import random
  from collections import Counter
  import numpy
  import pytest
  from neuraxle.hyperparams.distributions import *
label_desc: Use image node_id 13 for calling a global function with example usage: test_normal_onside_upper_tail_truncated() without return types