Write a script in Python or Go to parse a large log file and extract specific error rates, outputting the results in JSON format.
Implement parse_error_rates(log_lines), where each valid line has the format timestamp service level, separated by whitespace. Count INFO, WARN, and ERROR records per service, calculate each service's error rate as ERROR / all valid records * 100, round to two decimal places, and return a JSON object with services in lexicographic order. Ignore blank or malformed lines.
def parse_error_rates(log_lines):