def all_degrees(G, n):
    """
    Get the sum of the in and out degress of a node in a (Multi)DiGraph G
    :param G: (Multi)DiGraph
    :param n: node whose degree we want to find
    :return: overall degree of the node
    """
    return G.in_degree(n) + G.out_degree(n)