code: def test_qcut_binning_issues(datapath):
      # see gh-1978, gh-1979
      cut_file = datapath(
          os.path.join("reshape", "data", "cut_data.csv")
      )
      arr = np.loadtxt(cut_file)
      result = qcut(arr, 20)
  
      starts = []
      ends = []
  
      for lev in np.unique(result):
          s = lev.left
          e = lev.right
          assert s != e
  
          starts.append(float(s))
          ends.append(float(e))
  
      for (sp, sn), (ep, en) in zip(
          zip(starts[:-1], starts[1:]), zip(ends[:-1], ends[1:])
      ):
          assert sp < sn
          assert ep < en
          assert ep <= sn
  
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 8 for calling a global function with example usage: test_qcut_binning_issues(datapath) without return types