code: def prepare_env(FLAGS):
      output_dir = FLAGS.output_dir
      if not os.path.exists(output_dir):
          os.mkdir(output_dir)
      if (not os.path.isdir(output_dir)) or (
          not os.path.exists(output_dir)
      ):
          print(
              'Cannot create target output directory: "{0}"'.format(
                  output_dir
              )
          )
          return False
      return True
  
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 4 for calling a global function with example usage: prepare_env(FLAGS) and returns: True, False