#NEWLINE# def _validate( self , value ) : #NEWLINE# #INDENT# 'Validate an Enum value.\n\n    Raises:\n      TypeError if the value is not an instance of self._enum_type.\n    ' #NEWLINE# if ( not isinstance ( value , self . _enum_type ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'Expected a %s instance, got %r instead' % ( self . _enum_type . __name__ , self ) ) )