def _print_single_file(self, path, apps_models):
if path:<EOL><INDENT>outfile = codecs.open(path, '<STR_LIT:w>', encoding='<STR_LIT:utf-8>')<EOL>self._print = lambda s: outfile.write(s + '<STR_LIT:\n>')<EOL><DEDENT>self._print(self._diagram_start)<EOL>for app, app_models in apps_models:<EOL><INDENT>self._print_app(app, app_models)<EOL><DEDENT>self._print(self._diagram_end)<EOL>if path:<EOL><INDENT>outfile.close()<EOL><DEDENT>
Print apps_models which contains a list of 2-tuples containing apps and their models
into a single file.