code: def process(input_dir, output_dir, function):
          
          if not os.path.exists(output_dir):
              os.makedirs(output_dir)
          logger = log.get_global_console_logger()
          logger.info("Processing files in {}.".format(input_dir))
          input_file_names = os.listdir(input_dir)
          for input_file_name in input_file_names:
              logger.info("Processing {}.".format(input_file_name))
              input_file = os.path.join(input_dir, input_file_name)
              with codecs.open(input_file, "r", encoding="UTF-8") as f:
                  input_string = f.read()
              output_string = function(input_string)
              output_file = os.path.join(output_dir, input_file_name)
              with codecs.open(output_file, "w", encoding="UTF-8") as f:
                  f.write(output_string)
          logger.info("Saved processed files to {}.".format(output_dir))
docs: Apply function to all files in input_dir and save the resulting ouput
          files in output_dir.