We can order the nodes using some heuristic node ordering. For example, we can use depth-first search and breadth first-search and order from the highest degree nodes:
pθ(G∣zG)≈∏(u,v)∈VA~π[u,v]A[u,v]+(1−A~π[u,v])(1−A[u,v])
Or we can also consider a small heuristic set of ordering and average over these orderings:
pθ(G∣zG)≈∑πi∈{π1,…πn}∏(u,v)∈VA~πi[u,v]A[u,v]+(1−A~πi[u,v])(1−A[u,v])
This method has been proven to work great in practice.