def __last_error(namespace, args):
 cmd = SON([('getlasterror', 1)])
 cmd.update(args)
 splitns = namespace.split('.', 1)
 return query(0, (splitns[0] + '.$cmd'), 0, (-1), cmd, None, DEFAULT_CODEC_OPTIONS)

def __last_error ( namespace , args ) : cmd = SON ( [ ( 'getlasterror' , 1 ) ] ) cmd . update ( args ) splitns = namespace . split ( '.' , 1 ) return query ( 0 , ( splitns [ 0 ] + '.$cmd' ) , 0 , ( - 1 ) , cmd , None , DEFAULT_CODEC_OPTIONS )
data to send to do a lasterror .