code: def test_gaussian_distribution_mixture():
      distribution_amplitudes = [1, 1, 1]
      means = [-2, 0, 2]
      stds = [1, 1, 1]
      distribution_mins = [None for _ in range(len(means))]
      distribution_max = [None for _ in range(len(means))]
  
      hd = DistributionMixture.build_gaussian_mixture(
          distribution_amplitudes,
          means,
          stds,
          distribution_mins,
          distribution_max,
      )
  
      samples = hd_rvs_many(hd)
  
      samples_median = np.median(samples)
      assert -0.5 < samples_median < 0.5
      samples_std = np.std(samples)
      assert 1 < samples_std < 4
      assert abs(hd.pdf(-2.0) - 0.1510223590467952) < 1e-6
      assert abs(hd.pdf(0.0) - 0.16897473780926958) < 1e-6
      assert abs(hd.pdf(2.0) - 0.1510223590467952) < 1e-6
      assert abs(hd.cdf(-2.0) - 0.17426060106333743) < 1e-6
      assert abs(hd.cdf(0.0) - 0.5) < 1e-6
      assert abs(hd.cdf(2.0) - 0.8257393989366625) < 1e-6
  
      assert hd.min() == -np.inf
      assert hd.max() == np.inf
      assert abs(hd.mean() - 0.0) < 1e-6
      assert abs(hd.var() - 11.0 / 3) < 1e-6
      assert abs(hd.std() - math.sqrt(11.0 / 3)) < 1e-6
      # Verify that hd mean and variance also correspond to mean and variance of sampling.
      assert abs(hd.mean() - np.mean(samples)) < 1e-1
      assert abs(hd.var() - np.var(samples)) < 1e-1
  
imports: import random
  from collections import Counter
  import numpy
  import pytest
  from neuraxle.hyperparams.distributions import *
label_desc: Use image node_id 16 for calling a global function with example usage: test_gaussian_distribution_mixture() without return types