code: def test_given_discrete_data_when_estimating_entropy_discrete_then_it_should_return_correct_entropy_values():
      assert estimate_entropy_discrete(
          np.random.choice(2, (1000, 1), replace=True)
      ) == approx(entropy([0.5, 0.5]), 0.05)
      assert estimate_entropy_discrete(
          np.random.choice(2, (1000, 2), replace=True)
      ) == approx(entropy([0.25, 0.25, 0.25, 0.25]), 0.05)
  
file_path: dowhy/tests/gcm/test_uncertainty.py
imports: import numpy
  from flaky import flaky
  from pytest import approx
  from scipy.stats import entropy
  from dowhy.gcm.uncertainty import estimate_entropy_discrete, estimate_entropy_kmeans, estimate_entropy_of_probabilities, estimate_entropy_using_discretization, estimate_gaussian_entropy, estimate_variance
label_desc: Use image node_id 6 for calling a global function with example usage: test_given_discrete_data_when_estimating_entropy_discrete_then_it_should_return_correct_entropy_values() without return types