Razorpay infrastructure may expose multiple server IPs for a service. Given deterministic probe results for each IP, classify servers as available when at least one allowed attempt succeeds within the latency threshold.
A probe succeeds when its HTTP status is between 200 and 399, inclusive, and its latency is at most timeout_ms. For each server, inspect at most max_retries + 1 probes in order. Stop checking that server after its first successful probe.
Implement check_service_availability(servers, timeout_ms, max_retries). servers is a list of dictionaries containing a unique string ip and a probes list. Each probe is a dictionary with integer fields status and latency_ms. Return a dictionary with two lists, available and unavailable, preserving the original server order within each list.
def check_service_availability(servers, timeout_ms, max_retries):