<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def qcut(expr, bins, labels=False, sort=None, ascending=True):
 """ Get quantile-based bin indices of every element of a grouped and sorted expression. The indices of bins start from 0. If cuts are not of equal sizes, extra items will be appended into the first group. :param expr: expression for calculation :param bins: number of bins :param sort: name of the sort column :param ascending: whether to sort in ascending order :return: calculated column """

    if labels is None or labels:
        raise NotImplementedError('Showing bins or customizing labels not supported')
    return _rank_op(expr, QCut, types.int64, sort=sort, ascending=ascending,
                    _bins=bins)