code: def is_import_exception(mod):
      
      return (mod in IMPORT_EXCEPTIONS or
              any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
docs: Check module name to see if import has been whitelisted.
  
         Import based rules should not run on any whitelisted module