def METHOD_NAME(template_dir, output_dir, format_func, verbose=False):
    for dirpath, dirnames, filenames in os.walk(template_dir):
        dir_rel_path = os.path.relpath(dirpath, template_dir)
        if verbose:
            print("Entered {}/".format(dir_rel_path))
        for dirname in dirnames:
            outdir_name = format_func(dirname)
            outdir_path = os.path.join(output_dir, dir_rel_path, outdir_name)
            os.mkdir(outdir_path)
            if verbose:
                print("Created {}".format(outdir_path))
        for filename in filenames:
            with open(os.path.join(dirpath, filename), 'r') as template_file:
                contents = template_file.read()
            outfile_name = format_func(filename)
            outfile_path = os.path.join(output_dir, dir_rel_path, outfile_name)
            contents = format_func(contents)
            with open(outfile_path, 'w') as outfile:
                outfile.write(contents)
            if verbose:
                print("Created {}".format(outfile_path))