def performance_calculator_invite_optional(invitation_stats):
    try:
        accept_ratio = invitation_stats.sent / float(invitation_stats.accepted)
        return min(accept_ratio, 1.0)
    except ZeroDivisionError:
        return 0.0
dataset/ETHPy150Open muhuk/django-inviting/invitation/models.py/performance_calculator_invite_optional/swapped operands of `/`