#NEWLINE# def type_check( self , instance ) : #NEWLINE# #INDENT# from google.cloud.dataflow.transforms import window #NEWLINE# if ( not isinstance ( instance , window . WindowedValue ) ) : #NEWLINE# #INDENT# raise CompositeTypeHintError ( ( "Window type-constraint violated. Valid object instance must be of type 'WindowedValue'. Instead, an instance of '%s' was received." % instance . __class__ . __name__ ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# check_constraint ( e . inner_type , instance . value ) #NEWLINE# #UNINDENT# except ( CompositeTypeHintError , SimpleTypeHintError ) as e : #NEWLINE# #INDENT# raise CompositeTypeHintError ( ( '%s hint type-constraint violated. The type of element in is incorrect. Expected an instance of type %s, instead received an instance of type %s.' % ( repr ( self ) , _unified_repr ( self . inner_type ) , elem . __class__ . __name__ ) ) )