<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_graph(self, filename):
 """ Write raw graph data which can be post-processed using graphviz. """

        f = open(filename, 'w')
        f.write(self._get_graphviz_data())
        f.close()