code: def test_completeness_contamination():
      completeness, contamination = completeness_contamination(
          np.ones(100), np.ones(100)
      )
  
      assert_allclose(completeness, 1)
      assert_allclose(contamination, 0)
  
      completeness, contamination = completeness_contamination(
          np.zeros(100), np.zeros(100)
      )
  
      assert_allclose(completeness, 0)
      assert_allclose(contamination, 0)
  
      completeness, contamination = completeness_contamination(
          np.concatenate((np.ones(50), np.zeros(50))),
          np.concatenate((np.ones(25), np.zeros(50), np.ones(25))),
      )
  
      assert_allclose(completeness, 0.5)
      assert_allclose(contamination, 0.5)
  
file_path: astroML/astroML/utils/tests/test_utils.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal, assert_allclose
  from astroML.utils import log_multivariate_gaussian, convert_2D_cov, completeness_contamination, split_samples
label_desc: Use image node_id 6 for calling a global function with example usage: test_completeness_contamination() without return types