def all_neighbors(G, n):
    """
    Get a list of all neighbor-nodes (both predecessors and successors) of (Multi)DiGraph G
    :param G: (Multi)DiGraph
    :param n: list of nodes whose neighbours we want to find
    :return: corresponding list of all neighbor-nodes (no duplicates in list)
    """
    result = list(G.predecessors(n))
    result += list(G.successors(n))
    return list(set(result))