def assign_flag(pred: float, t_rouge: float, t_orange: float) -> str:
    """Turns a prediction score pred into an alert level.

    Args:
        pred: A predicted risk score between 0 and 1
        t_rouge: A threshold, between 0 and 1, used for selecting "high risk" records.
        t_orange: A threshold, between 0 and t_rouge, used for selecting "moderate
          risk" records. `t_orange` should not be greater than `t_rouge`.
          If `t_orange == t_rouge`, there will indeed be a single risk level (high
          risk).


    """
    assert 0 <= t_rouge <= 1, "t_rouge must be a number between 0 and 1"
    assert 0 <= t_orange <= 1, "t_orange must be a number between 0 and 1"
    assert t_orange <= t_rouge, "t_rouge should be greater than t_orange"

    if pred > t_rouge:
        return "Alerte seuil F1"
    if pred > t_orange:
        return "Alerte seuil F2"
    return "Pas d'alerte"