code: def test_histogram():
      school = (
          load_arviz_data("non_centered_eight").posterior["mu"].values
      )
      k_count_az, k_dens_az, _ = histogram(
          school, bins=np.asarray([-np.Inf, 0.5, 0.7, 1, np.Inf])
      )
      k_dens_np, *_ = np.histogram(
          school, bins=[-np.Inf, 0.5, 0.7, 1, np.Inf], density=True
      )
      k_count_np, *_ = np.histogram(
          school, bins=[-np.Inf, 0.5, 0.7, 1, np.Inf], density=False
      )
      assert np.allclose(k_count_az, k_count_np)
      assert np.allclose(k_dens_az, k_dens_np)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from scipy.special import logsumexp
  from scipy.stats import circstd
  from ...data import from_dict, load_arviz_data
  from ...stats.density_utils import histogram
  from ...stats.stats_utils import ELPDData, _angle, _circfunc, _circular_standard_deviation, _sqrt, get_log_likelihood
  from ...stats.stats_utils import logsumexp
  from ...stats.stats_utils import make_ufunc, not_valid, stats_variance_2d, wrap_xarray_ufunc
label_desc: Use image node_id 23 for calling a global function with example usage: test_histogram() without return types