code: def gen_travis(output_dir):
      y = yaml.load(model_template_str)
      travis_file = os.path.join(output_dir, "travis.yml")
  
      env_str = ""
      length = len(y["models"])
      for i in range(length):
          model = y["models"][i]["model"]
          model_name = model["name"]
          normalized_model_name = model_name.replace(".", "_")
          source_framework = model["source"]
          if False:
              env_str += "  - TEST_SOURCE_FRAMEWORK={0} TEST_MODEL={1}\n".format(
                  source_framework, normalized_model_name
              )
          else:
              length2 = len(model["targets"])
              for j in range(length2):
                  target_framework = model["targets"][j]
                  env_str += "  - TEST_SOURCE_FRAMEWORK={0} TEST_TARGET_FRAMEWORK={1} TEST_MODEL={2}\n".format(
                      source_framework,
                      target_framework,
                      normalized_model_name,
                  )
  
      with open(travis_file, "w+") as f:
          code = travis_template_str.format(env_str)
          f.write(code)
  
      return
  
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 3 for calling a global function with example usage: gen_travis(output_dir) without return types