def _write_cache(self, code, ts, file_info):
        try:
            if not os.path.exists(file_info.cache_dir):
                os.mkdir(file_info.cache_dir)
            with open(file_info.cache_path, 'w+b') as cache_file:
                cache_file.write(MAGIC)
                cache_file.write(struct.pack('i', ts))
                marshal.dump(code, cache_file)
        except (OSError, IOError):
            pass
Write a template as output
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/core/import_hooks.py/EnamlImporter._write_cache--crossover with--dataset/ETHPy150Open chrislacy/digitalashes.com/src/BaseHandler.py/BaseHandler.write_template