code: def test_duplicate_events():
      t = np.random.random(100)
      t[80:] = t[:20]
  
      x = np.ones_like(t)
      x[:20] += 1
  
      with catch_warnings(AstroMLDeprecationWarning):
          bins1 = bayesian_blocks(t)
          bins2 = bayesian_blocks(t[:80], x[:80])
  
      assert_allclose(bins1, bins2)
  
file_path: astroML/astroML/density_estimation/tests/test_bayesian_blocks.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_
  from astropy.tests.helper import catch_warnings
  from astroML.density_estimation import bayesian_blocks
  from astroML.utils.exceptions import AstroMLDeprecationWarning
label_desc: Use image node_id 2 for calling a global function with example usage: test_duplicate_events() without return types