code: def gen_mace_engine_factory(model_tags, embed_model_data, output_dir):
      cwd = os.path.dirname(__file__)
      j2_env = Environment(
          loader=FileSystemLoader(cwd),
          trim_blocks=True,
          keep_trailing_newline=True,
      )
      # generate mace_run BUILD file
      template_name = "mace_engine_factory.h.jinja2"
      model_tags = list(model_tags)
      source = j2_env.get_template(template_name).render(
          model_tags=model_tags,
          embed_model_data=embed_model_data,
      )
      with open(output_dir + "/mace_engine_factory.h", "w") as f:
          f.write(source)
  
imports: import argparse
  import os
  from jinja2 import Environment, FileSystemLoader
label_desc: Use image node_id 1 for calling a global function with example usage: gen_mace_engine_factory(model_tags, embed_model_data, output_dir) without return types