code: def encrypt_opencl_codegen(cl_kernel_dir, output_path):
      if not os.path.exists(cl_kernel_dir):
          print(
              "Input cl_kernel_dir " + cl_kernel_dir + " doesn't exist!"
          )
  
      encrypted_code_maps = {}
      common_h_hash = get_hash_value(
          os.path.join(cl_kernel_dir, "common.h")
      )
      for file_name in os.listdir(cl_kernel_dir):
          file_path = os.path.join(cl_kernel_dir, file_name)
          module_key = get_module_key(file_name)
          if module_key is not None and len(module_key) > 0:
              hash_str = get_hash_value(file_path)
              with open(file_path, "r") as f:
                  code_str = ""
                  headers = []
                  for line in f.readlines():
                      if "#include <common.h>" in line:
                          headers.append(get_module_key("common.h"))
                          hash_str += common_h_hash
                      else:
                          code_str += line
                  encrypted_code_arr = encrypt_code(code_str)
                  encrypted_code = {}
                  encrypted_code["headers"] = headers
                  encrypted_code["hash_str"] = hash_str
                  encrypted_code["code"] = encrypted_code_arr
                  encrypted_code_maps[module_key] = encrypted_code
  
      create_output_dir(os.path.dirname(output_path))
      write_cl_encrypted_kernel_to_file(
          encrypted_code_maps, "str2vec_maps.cc.jinja2", output_path
      )
      output_path_h = output_path.replace(".cc", ".h")
      write_cl_encrypted_kernel_to_file(
          encrypted_code_maps, "str2vec_maps.h.jinja2", output_path_h
      )
  
      print("Generate OpenCL kernel done.")
  
file_path: mace/mace/python/tools/encrypt_opencl_codegen.py
imports: import argparse
  import hashlib
  import os
  import shutil
  import sys
  import jinja2
label_desc: Use image node_id 6 for calling a global function with example usage: encrypt_opencl_codegen(cl_kernel_dir, output_path) without return types