code: def test_weighted_median_equal_weights():
      # Checks weighted percentile=0.5 is same as median when weights equal
      rng = np.random.RandomState(0)
      # Odd size as _weighted_percentile takes lower weighted percentile
      x = rng.randint(10, size=11)
      weights = np.ones(x.shape)
  
      median = np.median(x)
      w_median = _weighted_percentile(x, weights)
      assert median == approx(w_median)
  
file_path: scikit-learn/sklearn/utils/tests/test_stats.py
imports: import numpy
  from numpy.testing import assert_allclose
  from pytest import approx
  from sklearn.utils.stats import _weighted_percentile
label_desc: Use image node_id 5 for calling a global function with example usage: test_weighted_median_equal_weights() without return types