#NEWLINE# def __call__( self , date , ctx ) : #NEWLINE# #INDENT# self . _version_ = self . __version__ #NEWLINE# self . _last_ctx = ctx . get_id ( ) #NEWLINE# ctx_list = ( self . contexts or ( [ ctx ] * len ( self . nodes ) ) ) #NEWLINE# for ( ctx_ , node ) in zip ( ctx_list , self . nodes ) : #NEWLINE# #INDENT# node_value = ctx_ . get_value ( node ) #NEWLINE# handler_dict = self . context_handler_dict . setdefault ( ctx . get_id ( ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# key = ( node . name , node . short_name , ctx_ . get_id ( ) ) #NEWLINE# handler = handler_dict . get ( key ) #NEWLINE# if ( not handler ) : #NEWLINE# #INDENT# if ( isinstance ( node_value , ( basestring , int , float , bool , datetime . date ) ) or isinstance ( node_value , tuple ( np . typeDict . values ( ) ) ) ) : #NEWLINE# #INDENT# handler = NodeBaseTypeHandler ( node , filter = self . filter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( node_value , dict ) : #NEWLINE# #INDENT# handler = NodeDictTypeHandler ( node , filter = self . filter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( node_value , pa . Series ) : #NEWLINE# #INDENT# handler = NodeSeriesTypeHandler ( node , filter = self . filter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( node_value , ( list , tuple , deque , np . ndarray , pa . Index , pa . core . generic . NDFrame ) ) : #NEWLINE# #INDENT# handler = NodeListTypeHandler ( node , filter = self . filter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( 'Unhandled type %s for node %s' % ( type ( node_value ) , node ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# handler_dict [ key ] = ctx_ #NEWLINE# #UNINDENT# if ( ( self . start_date is None ) or ( date >= self . start_date ) ) : #NEWLINE# #INDENT# handler . handle ( date , ctx_ , node_value )