code: def test_histogram_bin_edges_execution(setup):
      rs = np.random.RandomState(0)
  
      raw = rs.randint(10, size=(20,))
      a = tensor(raw, chunk_size=6)
  
      # range provided
      for range_ in [(0, 10), (3, 11), (3, 7)]:
          bin_edges = histogram_bin_edges(a, range=range_)
          result = bin_edges.execute().fetch()
          expected = np.histogram_bin_edges(raw, range=range_)
          np.testing.assert_array_equal(result, expected)
  
      raw2 = rs.randint(10, size=(1,))
      b = tensor(raw2)
      raw3 = rs.randint(10, size=(0,))
      c = tensor(raw3)
      for t, r in [(a, raw), (b, raw2), (c, raw3), (sort(a), raw)]:
          test_bins = [
              10,
              "stone",
              "auto",
              "doane",
              "fd",
              "rice",
              "scott",
              "sqrt",
              "sturges",
          ]
          for bins in test_bins:
              bin_edges = histogram_bin_edges(t, bins=bins)
              result = bin_edges.execute().fetch()
              expected = np.histogram_bin_edges(r, bins=bins)
              np.testing.assert_array_equal(result, expected)
  
          test_bins = [[0, 4, 8], tensor([0, 4, 8], chunk_size=2)]
          for bins in test_bins:
              bin_edges = histogram_bin_edges(t, bins=bins)
              result = bin_edges.execute().fetch()
              expected = np.histogram_bin_edges(r, bins=[0, 4, 8])
              np.testing.assert_array_equal(result, expected)
  
          raw = np.arange(5)
          a = tensor(raw, chunk_size=3)
          bin_edges = histogram_bin_edges(a)
          result = bin_edges.execute().fetch()
          expected = np.histogram_bin_edges(raw)
          assert bin_edges.shape == expected.shape
          np.testing.assert_array_equal(result, expected)
  
imports: import numpy
  import scipy.sparse
  import pytest
  from ....utils import ignore_warning
  from ...datasource import arange, tensor, empty
  from ...base import sort
  from ...merge import stack
  from ...reduction import all
  from ..None import average, bincount, cov, corrcoef, ptp, digitize, histogram_bin_edges, histogram, quantile, percentile, median
  from ..quantile import INTERPOLATION_TYPES
label_desc: Use image node_id 6 for calling a global function with example usage: test_histogram_bin_edges_execution(setup) without return types