def warn_subscriptions_still_active(based_on_date=None):
    ending_date = based_on_date or datetime.date.today()
    subscriptions_still_active = Subscription.objects.filter(
        date_end__lte=ending_date,
        is_active=True,
    )
    for subscription in subscriptions_still_active:
        log_accounting_error("%s is still active." % subscription)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/accounting/tasks.py/warn_subscriptions_still_active/original