code: def _generate_lags(maxlag, multiplier):
      r
      # 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)
docs: r"""Generate a set of lag times starting from 1 to maxlag,
      using the given multiplier between successive lags