code: def test_histogram(N=1000, rseed=0):
      np.random.seed(0)
      x = np.random.normal(0, 1, N)
  
      for bins in [
          30,
          np.linspace(-5, 5, 31),
          "knuth",
          "scotts",
          "freedman",
      ]:
          with catch_warnings(AstroMLDeprecationWarning):
              counts, bins = histogram(x, bins)
          assert_(counts.sum() == len(x))
          assert_(len(counts) == len(bins) - 1)
  
file_path: astroML/astroML/density_estimation/tests/test_hist_binwidth.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_
  from astropy.tests.helper import catch_warnings
  from astroML.density_estimation import scotts_bin_width, freedman_bin_width, knuth_bin_width, histogram
  from astroML.utils.exceptions import AstroMLDeprecationWarning
label_desc: Use image node_id 4 for calling a global function with example usage: test_histogram(N, rseed) without return types