def range(start=None, stop=None, months=0, days=0):
    yesterday = datetime.date.today() - relativedelta(days=1)
    start = normalize(start) or yesterday
    stop = normalize(stop)
    is_past = 0 < days or months < 0

    if days or months:
        if start and stop:
            raise Exception(
                "A daterange cannot be defined using stop alongside months or days.")
        else:
            if is_past:
                days = days + 1
            else:
                days = days - 1

            delta = relativedelta(days=days, months=months)

            stop = start + delta

    stop = stop or start
    return map(serialize, sorted((start, stop)))
dataset/ETHPy150Open debrouwere/google-analytics/googleanalytics/utils/date.py/range/swapped operands of `<`