code: def gen_test(output_dir, model):
      model_name = model["name"]
      normalized_model_name = model_name.replace(".", "_")
      normalized_model_name2 = normalized_model_name.replace("-", "_")
      length = len(model["targets"])
      for i in range(length):
          test_file = os.path.join(
              output_dir,
              "test_{0}_{1}_{2}.py".format(
                  model["source"],
                  model["targets"][i],
                  normalized_model_name,
              ),
          )
          with open(test_file, "w+") as f:
              code = code_template_str.format(
                  model_name,
                  model["source"],
                  model["targets"][i],
                  normalized_model_name2,
              )
              f.write(code)
  
file_path: MMdnn/tests/gen_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import io
  import os
  import argparse
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: gen_test(output_dir, model) without return types