def getMembership(config, user):
 seen = set()
 for member_of in _getMembership(config, user, seen):
  (yield member_of)
 (yield 'all')

def getMembership ( config , user ) : seen = set ( ) for member_of in _getMembership ( config , user , seen ) : ( yield member_of ) ( yield 'all' )
generate groups user is member of .