Задача🌐 shown in RU
Implement `top_error_ips(lines, n=3)` for nginx-style log lines. Run it three times so we cover both boundaries plus the canonical case:
1. canonical sample (8 lines, mixed 5xx/2xx) with n=3 → top 3 error IPs
2. empty list with n=3 → empty result (boundary: no input)
3. canonical sample with n=1 → top 1 only (boundary: small n)
Print each result on its own line.
Expected:
[('10.0.0.5', 3), ('10.0.0.7', 2), ('10.0.0.1', 1)]
[]
[('10.0.0.5', 3)]