code: def generateDiff(self, oldWarnings, newWarnings):
          
          diffWarnings = {}
  
          for modulename in newWarnings:
              diffInModule = (
                  newWarnings[modulename] -
                  oldWarnings.get(modulename, set()))
              if diffInModule:
                  diffWarnings[modulename] = diffInModule
  
          return diffWarnings
docs: Generate diff between given two lists of warnings.
  
          @param oldWarnings: parsed old warnings
          @param newWarnings: parsed new warnings
          @return: a dict object of diff