code: def test_qcut_duplicates_bin(kwargs, msg):
      # see gh-7751
      values = [0, 0, 0, 0, 1, 2, 3]
  
      if msg is not None:
          with pytest.raises(ValueError, match=msg):
              qcut(values, 3, **kwargs)
      else:
          result = qcut(values, 3, **kwargs)
          expected = IntervalIndex(
              [Interval(-0.001, 1), Interval(1, 3)]
          )
          tm.assert_index_equal(result.categories, expected)
  
imports: import os
  import numpy
  import pytest
  import pandas
  from pandas import Categorical, DatetimeIndex, Interval, IntervalIndex, NaT, Series, Timedelta, TimedeltaIndex, Timestamp, cut, date_range, isna, qcut, timedelta_range
  import pandas._testing
  from pandas.api.types import CategoricalDtype
  from pandas.tseries.offsets import Day
label_desc: Use image node_id 13 for calling a global function with example usage: test_qcut_duplicates_bin(kwargs, msg) without return types