code: def priority_func(node):
      """Specify the rules for computing
      priority of a node. See Harwiche and Wang pg 12.
      """
      # We need to calculate the number of edges
      # that would be added.
      # For each node, we need to connect all
      # of the nodes in itself and its neighbours
      # (the "cluster") which are not already
      # connected. This will be the primary
      # key value in the heap.
      # We need to fix the secondary key, right
      # now its just 2 (because mostly the variables
      # will be discrete binary)
      introduced_arcs = 0
      cluster = [node] + node.neighbours
      for node_a, node_b in combinations(cluster, 2):
          if node_a not in node_b.neighbours:
              assert node_b not in node_a.neighbours
              introduced_arcs += 1
      return [introduced_arcs, 2]
  
imports: import copy
  import heapq
  import logging
  from collections import defaultdict
  from io import StringIO
  from itertools import combinations, product
  from random import choice, random
  from .exceptions import VariableNotInGraphError, VariableValueNotInDomainError
  from .graph import Node, UndirectedGraph, UndirectedNode, connect
  from .utils import get_args, get_original_factors
label_desc: Use image node_id 7 for calling a global function with example usage: priority_func(node) and returns: list