code: def format_edges_section(self):
          
          buf = io.StringIO()
          buf.write('edges\n')
          buf.write('(\n')
          for e in self.edges.values():
              buf.write('  ' + e.format(self.vertices) + '\n')
          buf.write(');')
          return buf.getvalue()
docs: format edges section.
          assign_vertexid() should be called before this method, because
          vertices reffered by blocks should have valid index.