code: def printUnusedImports(self):
          
          for module in self.listModules():
              names = [(unused.lineno, unused.name)
                       for unused in module.unused_names]
              names.sort()
              for lineno, name in names:
                  if not self.all_unused:
                      line = linecache.getline(module.filename, lineno)
                      if '#' in line:
                          # assume there's a comment explaining why it's not used
                          continue
                  print("%s:%s: %s not used" % (module.filename, lineno, name))
docs: Produce a report of unused imports.