code: def estimate_entropy_discrete(X: np.ndarray) -> float:
      """Estimates the entropy assuming the data in X is discrete.
  
      :param X: Discrete samples.
      :return: Entropy of X.
      """
      X = shape_into_2d(X)
  
      _, counts = np.unique(X, return_counts=True, axis=0)
      return entropy(counts)
  
file_path: dowhy/dowhy/gcm/uncertainty.py
imports: import numpy
  from numpy.linalg import det
  from scipy.special import digamma
  from scipy.stats import entropy
  from sklearn.neighbors import NearestNeighbors
  from dowhy.gcm.constant import EPS
  from dowhy.gcm.util.general import shape_into_2d
label_desc: Use image node_id 6 for calling a global function with example usage: estimate_entropy_discrete(X) and returns: entropy