code: def _cut(expr, bins, right=True, labels=None, include_lowest=False,
           include_under=False, include_over=False):
      
  
      is_seq = isinstance(expr, SequenceExpr)
      dtype = utils.highest_precedence_data_type(
          *(types.validate_value_type(it) for it in labels)) \
          if labels is not None else types.int64
      kw = {}
      if is_seq:
          kw['_data_type'] = dtype
      else:
          kw['_value_type'] = dtype
  
      return Cut(_input=expr, _bins=bins, _right=right, _labels=labels,
                 _include_lowest=include_lowest, _include_under=include_under,
                 _include_over=include_over, **kw)
docs: Return indices of half-open bins to which each value of `expr` belongs.
  
      :param expr: sequence or scalar
      :param bins: list of scalars
      :param right: indicates whether the bins include the rightmost edge or not. If right == True(the default),
                    then the bins [1, 2, 3, 4] indicate (1, 2], (2, 3], (3, 4]
      :param labels: Usesd as labes for the resulting bins. Must be of the same length as the resulting bins.
      :param include_lowest: Whether the first interval should be left-inclusive or not.
      :param include_under: include the bin below the leftmost edge or not
      :param include_over: include the bin above the rightmost edge or not
      :return: sequence or scalar