code: def gen_cpp(env, dir, file):
      scons_env(env)
      suffixes = ["_types.h", "_types.cpp"]
      targets = map(lambda s: "gen-cpp/" + file + s, suffixes)
      return env.ThriftCpp(targets, dir + file + ".thrift")
  
imports: from os import path
  from SCons.Builder import Builder
  from six.moves import map
label_desc: Use image node_id 2 for calling a global function with example usage: gen_cpp(env, dir, file) and returns: env