code: def layerset2list(discoursegraph):
      
      for node_id in discoursegraph:
          discoursegraph.node[node_id]['layers'] = \
              list(discoursegraph.node[node_id]['layers'])
      for (from_id, to_id) in discoursegraph.edges_iter():
          # there might be multiple edges between 2 nodes
          edge_dict = discoursegraph.edge[from_id][to_id]
          for edge_id in edge_dict:
              edge_dict[edge_id]['layers'] = \
                  list(edge_dict[edge_id]['layers'])
docs: typecasts all `layers` sets to lists to make the graph
      exportable (e.g. into the `geoff` format).
  
      Parameters
      ----------
      discoursegraph : DiscourseDocumentGraph