def performance_calculator_invite_only(invitation_stats):
    """Calculate a performance score between ``0.0`` and ``1.0``.
    """
    if app_settings.INVITE_ONLY:
        total = invitation_stats.available + invitation_stats.sent
    try:
        send_ratio = total / float(invitation_stats.sent)
    except ZeroDivisionError:
        send_ratio = 0.0
    accept_ratio = performance_calculator_invite_optional(invitation_stats)
    return min((send_ratio + accept_ratio) * 0.6, 1.0)
dataset/ETHPy150Open muhuk/django-inviting/invitation/models.py/performance_calculator_invite_only/swapped operands of `/`