def write_report_file(report, path, target_dir):
    if (report == {}):
        return
    filename = metrics_formatter.convert_path_to_report_filename(path)
    out_file_path = ((target_dir + '/') + filename)
    out_file_path = find_available_filename(out_file_path)
    with open(out_file_path, 'w') as output_file:
        metrics_formatter.write_report(report, 'html', output_file)
def write_report_file(report, path, target_dir):
    if (report == {}):
        return
    filename = metrics_formatter.convert_path_to_report_filename(path)
    out_file_path = ((target_dir + '/') + filename)
    out_file_path = find_available_filename(out_file_path)
    with open(out_file_path, 'w') as output_file:
        metrics_formatter.write_report(report, 'html', output_file)