Label each latency (in milliseconds) as "ok", "warn" or "crit" using two thresholds: a value is "crit"
when it is greater than or equal to crit_ms, "warn" when it is greater than or equal to warn_ms, and
"ok" otherwise. Return the labels in the same order as the input.
Implement classify. Input: latencies: list[float], warn_ms: float, crit_ms: float. Returns: list[str].
def classify(latencies: list[float], warn_ms: float, crit_ms: float) -> list[str]:
labels = []
return labels
Run executes the public tests. Submit grades against public and hidden tests.
Label each latency (in milliseconds) as "ok", "warn" or "crit" using two thresholds: a value is "crit"
when it is greater than or equal to crit_ms, "warn" when it is greater than or equal to warn_ms, and
"ok" otherwise. Return the labels in the same order as the input.
Implement classify. Input: latencies: list[float], warn_ms: float, crit_ms: float. Returns: list[str].
def classify(latencies: list[float], warn_ms: float, crit_ms: float) -> list[str]:
labels = []
return labels
Run executes the public tests. Submit grades against public and hidden tests.