def _patched_run_hook(hook_name, project_dir, context):
if hook_name == '<STR_LIT>':<EOL><INDENT>with temple.utils.cd(project_dir):<EOL><INDENT>temple.utils.write_temple_config(context['<STR_LIT>'],<EOL>context['<STR_LIT>'],<EOL>context['<STR_LIT:version>'])<EOL><DEDENT><DEDENT>return cc_hooks.run_hook(hook_name, project_dir, context)<EOL>
Used to patch cookiecutter's ``run_hook`` function.

    This patched version ensures that the temple.yaml file is created before
    any cookiecutter hooks are executed