#NEWLINE# def neighbors( self , obj ) : #NEWLINE# #INDENT# '\n        Return all neighbors adjacent to the given node.\n        \n        @type  obj: node\n        @param obj: Object identifier.\n        \n        @rtype:  list\n        @return: List of all node objects adjacent to the given node.\n        ' #NEWLINE# neighbors = set ( [ ] ) #NEWLINE# for e in self . node_links [ obj ] : #NEWLINE# #INDENT# neighbors . update ( set ( e . edge_links [ e ] ) ) #NEWLINE# #UNINDENT# return list ( ( neighbors - set ( [ obj ] ) ) )