class_docstr: A class for the maximum weight clique algorithm.
  
  This class is a helper for the `max_weight_clique` function.  The class
  should not normally be used directly.
  
  Parameters
  ----------
  G : NetworkX graph
      The undirected graph for which a maximum weight clique is sought
  weight : string or None, optional (default='weight')
      The node attribute that holds the integer value used as a weight.
      If None, then each node has weight 1.
  
  Attributes
  ----------
  G : NetworkX graph
      The undirected graph for which a maximum weight clique is sought
  node_weights: dict
      The weight of each node
  incumbent_nodes : list
      The nodes of the incumbent clique (the best clique found so far)
  incumbent_weight: int
      The weight of the incumbent clique
class_docstr_tok: ["A","class","for","the","maximum","weight","clique","algorithm",".","This","class","is","a","helper","for","the","`","max_weight_clique","`","function",".","The","class","should","not","normally","be","used","directly",".","Parameters","--","--","--","--","--","G",":","NetworkX","graph","The","undirected","graph","for","which","a","maximum","weight","clique","is","sought","weight",":","string","or","None",",","optional","(","default='weight","'",")","The","node","attribute","that","holds","the","integer","value","used","as","a","weight",".","If","None",",","then","each","node","has","weight","1",".","Attributes","--","--","--","--","--","G",":","NetworkX","graph","The","undirected","graph","for","which","a","maximum","weight","clique","is","sought","node_weights",":","dict","The","weight","of","each","node","incumbent_nodes",":","list","The","nodes","of","the","incumbent","clique","(","the","best","clique","found","so","far",")","incumbent_weight",":","int","The","weight","of","the","incumbent","clique"]
docstr: Find a set of nodes to branch on.
docstr_tok: ["Find","a","set","of","nodes","to","branch","on","."]
code: def find_branching_nodes(self, P, target):
      """Find a set of nodes to branch on."""
      residual_wt = {v: self.node_weights[v] for v in P}
      total_wt = 0
      P = P[:]
      while P:
          independent_set = self.greedily_find_independent_set(P)
          min_wt_in_class = min(residual_wt[v] for v in independent_set)
          total_wt += min_wt_in_class
          if total_wt > target:
              break
          for v in independent_set:
              residual_wt[v] -= min_wt_in_class
          P = [v for v in P if residual_wt[v] != 0]
      return P
  
file_path: networkx/networkx/algorithms/clique.py
imports: from collections import defaultdict, deque
  from itertools import chain, combinations, islice
  import networkx
  from networkx.utils import not_implemented_for
label_desc: Use image node_id 4 for calling the MaxWeightClique obj's underlying member method code with example usage: obj.find_branching_nodes(P, target) and returns: P