#NEWLINE# def getdb( backend = None , **kwargs ) : #NEWLINE# #INDENT# 'get a :class:`BackendDataServer`.' #NEWLINE# if isinstance ( backend , BackendDataServer ) : #NEWLINE# #INDENT# return backend #NEWLINE# #UNINDENT# backend = ( backend or settings . DEFAULT_BACKEND ) #NEWLINE# if ( not backend ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# ( scheme , address , params ) = parse_backend ( backend ) #NEWLINE# params . update ( kwargs ) #NEWLINE# if ( 'timeout' in params ) : #NEWLINE# #INDENT# params [ 'timeout' ] = int ( params [ 'timeout' ] ) #NEWLINE# #UNINDENT# return _getdb ( scheme , address , params )