from typing import Literal Metric = Literal["flow", "pressure", "velocity"] DISPLAY_UNITS: dict[Metric, str] = { "flow": "m³/h", "pressure": "m", "velocity": "m/s", } def display_unit_for_metric(metric: Metric) -> str: return DISPLAY_UNITS[metric]