def cliques(graph, threshold=3):
 a = []
 for n in graph.nodes:
  c = clique(graph, n.id)
  if (len(c) >= threshold):
   c.sort()
   if (c not in a):
    a.append(c)
 return a

def cliques ( graph , threshold = 3 ) : a = [ ] for n in graph . nodes : c = clique ( graph , n . id ) if ( len ( c ) >= threshold ) : c . sort ( ) if ( c not in a ) : a . append ( c ) return a
returns all cliques in the graph with at least the given number of nodes .