def clique(graph, id):
 if isinstance(id, Node):
  id = id.id
 a = [id]
 for n in graph.nodes:
  try:
   next((id for id in a if ((n.id == id) or (graph.edge(n.id, id) is None))))
  except StopIteration:
   a.append(n.id)
 return a

def clique ( graph , id ) : if isinstance ( id , Node ) : id = id . id a = [ id ] for n in graph . nodes : try : next ( ( id for id in a if ( ( n . id == id ) or ( graph . edge ( n . id , id ) is None ) ) ) ) except StopIteration : a . append ( n . id ) return a
returns the largest possible clique for the node with given id .