def hierarchy(self):
    'Returns a new graph that describes the hierarchical relationships\n        between the groups.\n\n        The new graph will be a directed tree; an edge will point from\n        vertex M{i} to vertex M{j} if group M{i} is a superset of group M{j}.\n        In other words, the edges point downwards.\n        '
    from igraph import Graph
    edges = [pair for pair in izip(self._parent, xrange(len(self))) if (pair[0] is not None)]
    return Graph(edges, directed=True)
Returns a new graph that describes the hierarchical relationships
between the groups.

The new graph will be a directed tree; an edge will point from
vertex M{i} to vertex M{j} if group M{i} is a superset of group M{j}.
In other words, the edges point downwards.
def hierarchy(self):
    'Returns a new graph that describes the hierarchical relationships\n        between the groups.\n\n        The new graph will be a directed tree; an edge will point from\n        vertex M{i} to vertex M{j} if group M{i} is a superset of group M{j}.\n        In other words, the edges point downwards.\n        '
    from igraph import Graph
    edges = [pair for pair in izip(self._parent, xrange(len(self))) if (pair[0] is not None)]
    return Graph(edges, directed=True)