code: def test_1D_density(clf, atol=100):
      np.random.seed(0)
      dist = norm(0, 1)
  
      X = dist.rvs((5000, 1))
      X2 = np.linspace(-5, 5, 10).reshape((10, 1))
      true_dens = dist.pdf(X2[:, 0]) * X.shape[0]
  
      clf.fit(X)
      dens = clf.eval(X2)
  
      assert_allclose(dens, true_dens, atol=atol)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_allclose
  from scipy.stats import norm
  from astroML.density_estimation import KNeighborsDensity, GaussianMixture1D
label_desc: Use image node_id 1 for calling a global function with example usage: test_1D_density(clf, atol) without return types