def flatten_reply(reply):
 (nodes, dupes) = ({}, set())
 for item in reply:
  [dupes.add(name) for name in item if (name in nodes)]
  nodes.update(item)
 if dupes:
  warnings.warn(DuplicateNodenameWarning(W_DUPNODE.format(pluralize(len(dupes), u'name'), u', '.join(sorted(dupes)))))
 return nodes

def flatten_reply ( reply ) : ( nodes , dupes ) = ( { } , set ( ) ) for item in reply : [ dupes . add ( name ) for name in item if ( name in nodes ) ] nodes . update ( item ) if dupes : warnings . warn ( DuplicateNodenameWarning ( W_DUPNODE . format ( pluralize ( len ( dupes ) , u'name' ) , u', ' . join ( sorted ( dupes ) ) ) ) ) return nodes
flatten node replies .