code: def get_node_annotation_layers(docgraph):
      
      all_layers = set()
      for node_id, node_attribs in docgraph.nodes_iter(data=True):
          for layer in node_attribs['layers']:
              all_layers.add(layer)
      return all_layers
docs: 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 nodes in the given
          graph