from typing import Optional HIGH_THRESHOLD = 0.85 MED_THRESHOLD = 0.65 def score_bucket(score: Optional[float]) -> Optional[str]: if score is None: return None if score >= HIGH_THRESHOLD: return "high" if score >= MED_THRESHOLD: return "med" return "low"