import re def slug_label(value: str) -> str: return re.sub(r" +", "-", value.strip().lower())