code: def prepare_template(filename: str):
      """Prepare the path to template"""
      path = os.path.dirname(__file__)
      json_file = os.path.join(path, "sample_template", filename)
      with open(json_file) as f:
          file_data = f.read()
      in_path = os.path.join(path, "sample_input")
      file_data = file_data.replace("{in_path}", in_path)
      out_path = os.path.join(path, "sample_output")
      file_data = file_data.replace("{out_path}", out_path)
      working_path = os.path.join(path, "_temp")
      if not os.path.exists(working_path):
          os.makedirs(working_path)
      out_file = os.path.join(working_path, filename)
      with open(out_file, "w") as f:
          f.write(file_data)
      return out_file
  
file_path: contextual-ai/tests/compiler/util.py
imports: import os
  import json
  import yaml
  import shutil
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_template(filename) and returns: out_file