def graph_number_of_cliques(G, cliques=None):
 if (cliques is None):
  cliques = list(find_cliques(G))
 return len(cliques)

def graph_number_of_cliques ( G , cliques = None ) : if ( cliques is None ) : cliques = list ( find_cliques ( G ) ) return len ( cliques )
returns the number of maximal cliques in the graph .