<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _generate_lags(maxlag, multiplier):
 r"""Generate a set of lag times starting from 1 to maxlag, using the given multiplier between successive lags """

    # determine lag times
    lags = [1]
    # build default lag list
    lag = 1.0
    import decimal
    while lag <= maxlag:
        lag = lag*multiplier
        # round up, like python 2
        lag = int(decimal.Decimal(lag).quantize(decimal.Decimal('1'),
                                                rounding=decimal.ROUND_HALF_UP))
        if lag <= maxlag:
            ilag = int(lag)
            lags.append(ilag)
    # always include the maximal requested lag time.
    if maxlag not in lags:
        lags.append(maxlag)
    return np.array(lags)