code: def gen_diff(table_old, table_new):
      table = []
      files_new = set([x[0] for x in table_new])
      files_old = set([x[0] for x in table_old])
      added, deleted, unchanged = (
          files_new - files_old,
          files_old - files_new,
          files_new & files_old,
      )
      if added:
          for file in added:
              file_stat = [
                  stats for stats in table_new if file in stats
              ]
              table.append(
                  [
                      file_stat[0][0],
                      file_stat[0][1],
                      file_stat[0][1] - 0,
                      file_stat[0][2],
                      file_stat[0][2] - 0,
                  ]
              )
      if deleted:
          for file in deleted:
              file_stat = [
                  stats for stats in table_old if file in stats
              ]
              table.append(
                  [
                      file_stat[0][0],
                      0,
                      0 - file_stat[0][1],
                      0,
                      0 - file_stat[0][2],
                  ]
              )
      if unchanged:
          for file in unchanged:
              file_stat_old = [
                  stats for stats in table_old if file in stats
              ]
              file_stat_new = [
                  stats for stats in table_new if file in stats
              ]
              if (
                  file_stat_new[0][1] - file_stat_old[0][1] != 0
                  or file_stat_new[0][2] - file_stat_old[0][2] != 0
              ):
                  table.append(
                      [
                          file_stat_new[0][0],
                          file_stat_new[0][1],
                          file_stat_new[0][1] - file_stat_old[0][1],
                          file_stat_new[0][2],
                          file_stat_new[0][2] - file_stat_old[0][2],
                      ]
                  )
      return table
  
imports: import os, sys
  import token
  import tokenize
  import itertools
  from tabulate import tabulate
label_desc: Use image node_id 2 for calling a global function with example usage: gen_diff(table_old, table_new) and returns: table