code: def test_kl():
      np.testing.assert_almost_equal(
          kullback_leibler_divergence(
              np.array([0.25, 0.25, 0.25, 0.25]),
              np.array([0.85, 0.05, 0.05, 0.05]),
          ),
          0.90105,
          4,
      )
      np.testing.assert_almost_equal(
          kullback_leibler_divergence(
              np.array([0.85, 0.05, 0.05, 0.05]),
              np.array([0.25, 0.25, 0.25, 0.25]),
          ),
          0.79875,
          4,
      )
      np.testing.assert_equal(
          kullback_leibler_divergence(
              np.array([0.25, 0.25, 0.25, 0.25]),
              np.array([0.25, 0.25, 0.25, 0.25]),
          ),
          0,
      )
      np.testing.assert_equal(
          kullback_leibler_divergence(
              np.array([0.85, 0.05, 0.05, 0.05]),
              np.array([0.85, 0.05, 0.05, 0.05]),
          ),
          0,
      )
      np.testing.assert_almost_equal(
          kullback_leibler_divergence(
              np.array([0.0, 0.0, 0.0, 0.0]),
              np.array([0.0, 0.0, 0.0, 0.05]),
          ),
          0,
          4,
      )
  
file_path: popmon/tests/popmon/analysis/comparison/test_comparisons.py
imports: import numpy
  import pytest
  from popmon.analysis.comparison.comparisons import jensen_shannon_divergence, ks_prob, ks_test, kullback_leibler_divergence, population_stability_index, uu_chi2
label_desc: Use image node_id 4 for calling a global function with example usage: test_kl() without return types