code: def test_simple_gmm_weights():
      x = np.array([1.0, 1.0, 2.0, 3.0, 1.0, 3.0])
      d = gmm_1d_distribution(x)
  
      x2 = np.array([1.0, 2.0, 3.0])
      w = np.array([3.0, 1.0, 2.0])
      d2 = gmm_1d_distribution(x2, weights=w)
      y2 = d2(np.array([1.1, 2.0]))
  
      assert (
          d2(1.1) == y2[0]
      ), "GMM distribution array & scalar results don't match"
      assert (
          np.abs(d(1.1) - d2(1.1)) < 1e-5
      ), "GMM distribution weights not handled correctly"
      assert (
          np.abs(d(2.0) - d2(2.0)) < 1e-5
      ), "GMM distribution weights not handled correctly"
  
imports: import pytest
  import numpy
  import scipy.stats
  from brainiak.hyperparamopt.hpo import gmm_1d_distribution, fmin
label_desc: Use image node_id 2 for calling a global function with example usage: test_simple_gmm_weights() without return types