def print_diff_preview(all_diffs):
    if not all_diffs:
        return

    diff_list = [(device_name, diff)
                 for device_name, diff in all_diffs.iteritems()]
    diff_list = sorted(diff_list, key=lambda x: len(x[1]))

    # print diff with max no. of lines
    device_name, diff = diff_list[-1]
    PrintReminder.purple(device_name % 'Showing one of the biggest diff at %s')
    print(diff)

    # print a summary for each devices, how many lines are in each diff
    PrintReminder.purple('Diffs summary:')
    for device_name, diff in diff_list:
        PrintReminder.purple(
                '%s diff contains %d lines' % (
                    device_name, len(diff.splitlines())))

    PrintReminder.purple_bg(
            'Diffs are saved at %s. Please review with care!' %
            config.diff_dir)
dataset/ETHPy150Open facebook/fbpush/fbpush/main.py/print_diff_preview/swapped operands of `%`