code: def redactor(blacklist: Dict[Pattern, str]) -> Callable[[str], str]:
      
      def processor_wrapper(msg: str) -> str:
          for regex, repl in blacklist.items():
              if repl is None:
                  repl = '<redacted>'
              msg = regex.sub(repl, msg)
          return msg
      return processor_wrapper
docs: Returns a function which transforms a str, replacing all matches for its replacement