<s> class ClientProxy ( object ) : <EOL> def __init__ ( self , app ) : <EOL> self . __app = app <EOL> self . __client = ( None , None ) <EOL> def __getattr__ ( self , attr ) : <EOL> return getattr ( self . __get_client ( ) , attr ) <EOL> def __call__ ( self , * args , ** kwargs ) : <EOL> return self . __get_client ( ) ( * args , ** kwargs ) <EOL> def __eq__ ( self , other ) : <EOL> return self . __get_client ( ) == other <EOL> def __get_client ( self ) : <EOL> setting , client = self . __client <EOL> if setting != self . __app . config [ '<STR_LIT>' ] : <EOL> setting = self . __app . config [ '<STR_LIT>' ] <EOL> client = get_client ( setting ) <EOL> self . __client = ( setting , client ) <EOL> return client <EOL> def capture ( self , * args , ** kwargs ) : <EOL> return self . __get_client ( ) . capture ( * args , ** kwargs ) <EOL> def get_client ( path ) : <EOL> module , class_name = path . rsplit ( '<STR_LIT:.>' , <NUM_LIT:1> ) <EOL> return getattr ( __import__ ( module , { } , { } , class_name ) , class_name ) ( ) </s>
