def successors(DiGraph, X):
    """
    returns successors of a node or list of nodes
    """

    if X in DiGraph:
        return DiGraph.successors(X)
    else:
        sucs = set([])
        for x in X: sucs.update(set(DiGraph.successors(x)))
        return sorted(sucs)