def METHOD_NAME(self, out='out.txt'):
    with open(out, 'w') as f:
        f.write('NODES\n')
        for n in self.graph.nodes:
            f.write('{}\n'.format(n))
            f.write('\n')
            f.write('EDGES\n')
        for e in self.graph.edges:
            f.write('{} {} 1 1\n'.format(*e))