#NEWLINE# def add_namespace( config , namespace ) : #NEWLINE# #INDENT# service_names = set ( config ) #NEWLINE# prefix = ( namespace + '.' ) #NEWLINE# def add_to_service( name , service_config ) : #NEWLINE# #INDENT# namespace_links ( service_config , prefix , service_names ) #NEWLINE# namespace_volumes_from ( service_config , prefix , service_names ) #NEWLINE# namespace_net ( service_config , prefix , service_names ) #NEWLINE# return ( ( prefix + name ) , service_config ) #NEWLINE# #UNINDENT# config = dict ( ( add_to_service ( service , conf ) for ( service , conf ) in config . items ( ) ) ) #NEWLINE# config [ 'namespace' ] = namespace #NEWLINE# return config