code: def test_hist():
      np.random.seed(0)
      X_col = np.random.random_sample((1000,))
      counts, vals = np.histogram(X_col, bins="doane")
  
      X_col = np.concatenate(([np.nan], X_col))
  
      native = Native.get_native_singleton()
      n_cuts = native.get_histogram_cut_count(X_col)
  
      cuts = native.cut_uniform(X_col, n_cuts)
      bin_indexes = native.discretize(X_col, cuts)
      bin_counts = np.bincount(bin_indexes, minlength=len(cuts) + 2)
      edges = np.concatenate(
          ([np.nanmin(X_col)], cuts, [np.nanmax(X_col)])
      )
  
      assert bin_counts[0] == 1
      assert np.sum(bin_counts) == 1000 + 1
      bin_counts = bin_counts[1:]
  
      assert np.array_equal(counts, bin_counts)
      assert np.allclose(vals, edges)
  
file_path: interpret/python/interpret-core/tests/utils/test_native.py
imports: from interpret.utils._native import Native
  import numpy
  from scipy.stats import normaltest, shapiro
label_desc: Use image node_id 1 for calling a global function with example usage: test_hist() without return types