def can_send_reminder(last_due_date, latest_recorded_payment):
    if not settings.ENABLE_REMINDERS:
        return False
    can_send = True
    if not latest_recorded_payment:
        logger.critical("no payments in the database.")
        can_send = False
    else:
        if latest_recorded_payment > datetime.now():
            latest_recorded_payment = datetime.now()
        due_plus_margin = last_due_date + timedelta(days=settings.REMINDER_GRACE_DAYS)
        if latest_recorded_payment < due_plus_margin:
            can_send = False

    return can_send
Test to sort an unsorted file with variants
dataset/ETHPy150Open kapsiry/sikteeri/membership/management/commands/makebills.py/can_send_reminder--crossover with--dataset/ETHPy150Open moonso/genmod/tests/vcf_tools/test_sorting.py/test_sort_variants