def to_png_file(self, fname: str):
cmd = pipes.Template()<EOL>cmd.append('<STR_LIT>' % fname, '<STR_LIT>')<EOL>with cmd.open('<STR_LIT>', '<STR_LIT:w>') as f:<EOL><INDENT>f.write(self.to_dot())<EOL><DEDENT>
write a '.png' file.