docs: def get_edge_annotation_layers(docgraph):
      """
      WARNING: this is higly inefficient!
      Fix this via Issue #36.
  
      Returns
      -------
      all_layers : set or dict
          the set of all annotation layers used for annotating edges in the given
          graph
      """
      all_layers = set()
      for source_id, target_id, edge_attribs in docgraph.edges_iter(data=True):
          for layer in edge_attribs['layers']:
              all_layers.add(layer)
      return all_layers