code: def test_histogram_bin_edges():
      a = array([0, 0, 0, 1, 2, 3, 3, 4, 5], chunk_size=3)
  
      with pytest.raises(ValueError):
          histogram_bin_edges(a, bins="unknown")
  
      with pytest.raises(TypeError):
          # bins is str, weights cannot be provided
          histogram_bin_edges(a, bins="scott", weights=a)
  
      with pytest.raises(ValueError):
          histogram_bin_edges(a, bins=-1)
  
      with pytest.raises(ValueError):
          # not asc
          histogram_bin_edges(a, bins=[3, 2, 1])
  
      with pytest.raises(ValueError):
          # bins cannot be 2d
          histogram_bin_edges(a, bins=np.random.rand(2, 3))
  
      with pytest.raises(ValueError):
          histogram_bin_edges(a, range=(5, 0))
  
      with pytest.raises(ValueError):
          histogram_bin_edges(a, range=(np.nan, np.nan))
  
      bins = histogram_bin_edges(a, bins=3, range=(0, 5))
      # if range specified, no error will occur
      tile(bins)
  
file_path: mars/mars/tensor/statistics/tests/test_statistics.py
imports: import numpy
  import pytest
  from ....core import tile
  from ....lib.version import Version
  from ...datasource import tensor, array
  from ..None import digitize, histogram_bin_edges, quantile, percentile
  from ..quantile import INTERPOLATION_TYPES
label_desc: Use image node_id 2 for calling a global function with example usage: test_histogram_bin_edges() without return types