def inject_code(new_code, target_code):
new_code = "<STR_LIT>".format(<EOL>os.linesep, os.linesep.join(new_code.strip().splitlines())<EOL>)<EOL>pos = __inject_pos(target_code)<EOL>return target_code[:pos] + new_code + target_code[pos:]<EOL>
Inject new_code into target_code, before the first non-future import.

NOTE: this is just a hack to make examples work out-of-the-box, in
the general case it can fail in several ways.