def output_csv(file_path, wv_dict, max_wave_len):
    print('Writing results to file {}'.format(file_path))
    with open(file_path, 'w', encoding='utf-8', newline='') as csvfile:
        wave_headers = [('wave_' + str((x + 1))) for x in range(max_wave_len)]
        header = (['Hostname', 'Total'] + wave_headers)
        writer = csv.writer(csvfile, delimiter=',')
        writer.writerow(header)
        for k in wv_dict:
            row = ([k, wv_dict[k]['total']] + wv_dict[k]['waves'])
            writer.writerow(row)
def output_csv(file_path, wv_dict, max_wave_len):
    print('Writing results to file {}'.format(file_path))
    with open(file_path, 'w', encoding='utf-8', newline=) as csvfile:
        wave_headers = [('wave_' + str((x + 1))) for x in range(max_wave_len)]
        header = (['Hostname', 'Total'] + wave_headers)
        writer = csv.writer(csvfile, delimiter=',')
        writer.writerow(header)
        for k in wv_dict:
            row = ([k, wv_dict[k]['total']] + wv_dict[k]['waves'])
            writer.writerow(row)