Given an array of log lines logs and an array of target error codes target_codes, return a dictionary mapping each target error code to the number of times it appears in the logs. A valid error code appears in the form ERROR_CODE=<code> within a log line. Ignore malformed lines and codes not present in target_codes.
ERROR_CODE=<code> and ends at the next space or end of linedef aggregate_error_codes(logs, target_codes):