code: def test_cut_duplicates_bin(kwargs, msg):
      # see gh-20947
      bins = [0, 2, 4, 6, 10, 10]
      values = Series(
          np.array([1, 3, 5, 7, 9]), index=["a", "b", "c", "d", "e"]
      )
  
      if msg is not None:
          with pytest.raises(ValueError, match=msg):
              cut(values, bins, **kwargs)
      else:
          result = cut(values, bins, **kwargs)
          expected = cut(values, pd.unique(np.asarray(bins)))
          tm.assert_series_equal(result, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import Categorical, DataFrame, DatetimeIndex, Index, Interval, IntervalIndex, Series, TimedeltaIndex, Timestamp, cut, date_range, interval_range, isna, qcut, timedelta_range, to_datetime
  import pandas._testing
  from pandas.api.types import CategoricalDtype
  import pandas.core.reshape.tile
label_desc: Use image node_id 27 for calling a global function with example usage: test_cut_duplicates_bin(kwargs, msg) without return types