code: def _isproperdist(X):
      """
      Checks to see if `X` is a proper probability distribution
      """
      X = np.asarray(X)
      if (
          not np.allclose(np.sum(X), 1)
          or not np.all(X >= 0)
          or not np.all(X <= 1)
      ):
          return False
      else:
          return True
  
file_path: statsmodels/statsmodels/sandbox/infotheo.py
imports: from statsmodels.compat.python import lzip, lmap
  from scipy import stats
  import numpy
  from matplotlib import pyplot
  from scipy.special import logsumexp
label_desc: Use image node_id 2 for calling a global function with example usage: _isproperdist(X) and returns: False, True