#NEWLINE# def mount( self , prefix , adapter ) : #NEWLINE# #INDENT# 'Registers a connection adapter to a prefix.\n\n        Adapters are sorted in descending order by key length.' #NEWLINE# self . adapters [ prefix ] = adapter #NEWLINE# keys_to_move = [ k for k in self . adapters if ( len ( k ) < len ( prefix ) ) ] #NEWLINE# for key in keys_to_move : #NEWLINE# #INDENT# self . adapters [ key ] = self . adapters . pop ( key )