code: def register(filetypes):
      
      def decorator(clazz):
          for ext in filetypes:
              checkers.setdefault(ext, []).append(clazz)
          return clazz
      return decorator
docs: Decorator to register a class as a checker for extensions.