code: def main():
      dest_file_path = sys.argv[1]
      src_paths = sys.argv[2:]
  
      with open(dest_file_path, "r") as f:
          dest_content = f.read()
  
      template_name_to_content = {}
  
      for src_path in src_paths:
          with open(src_path, "r") as f:
              content = f.read()
  
          src_basename = os.path.basename(src_path)
  
          if src_basename in template_name_to_content:
              raise ValueError(
                  "Duplicate src basename: %s" % src_basename
              )
          template_name_to_content[src_basename] = content
  
      search_key = (
          "%("
          + "|".join(
              [re.escape(key) for key in template_name_to_content]
          )
          + ")%"
      )
  
      def replace_key_with_content(match):
          return template_name_to_content[match.group(1)]
  
      inlined_content = re.sub(
          search_key, replace_key_with_content, dest_content
      )
      sys.stdout.write(inlined_content)
  
imports: import os
  import re
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: main() and returns: template_name_to_content