'Returns the lineage of histories leading up to `h`.'

def lineage(self, h):

    lineage = []
    predecessors = self._graph.predecessors(h)
    while len(predecessors):
        lineage.append(predecessors[0])
        predecessors = self._graph.predecessors(predecessors[0])
    lineage.reverse()
    return lineage
