def generate_monthly_billing_datetimes(period, dist=None):
    # make sure period is closed
    period_delta = period.timedelta
    if period_delta is None:
        message = "Please provide a period with valid start and end date."
        raise ValueError(message)

    # The default distribution is poisson, which is a discrete distribution
    # often used to simulate rare events in nature with a particular average
    # frequency. In this case, we're using an average frequency of 12 times per
    # 365 days.
    if dist is None:
        dist = poisson(365/12.)

    periods = [period.start]
    while True:
        next_date = periods[-1] + timedelta(days=dist.rvs())
        if next_date < period.end:
            periods.append(next_date)
        else:
            break
    return periods
Returns an array of poisson distributed datetimes falling on simulated
dataset/ETHPy150Open impactlab/eemeter/eemeter/generator.py/generate_monthly_billing_datetimes