#NEWLINE# def __validate_args( self , parameters , secret ) : #NEWLINE# #INDENT# '\n    Validate the arguments provided by user.\n\n    Args:\n      parameters  A dictionary (or a JSON string) provided by the client\n      secret      Secret sent by the client\n\n    Returns:\n      Processed user arguments\n\n    Raises\n      TypeError If at least one user argument is not of the current type\n    ' #NEWLINE# if ( ( type ( parameters ) != type ( '' ) ) and ( type ( parameters ) != type ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) ) : #NEWLINE# #INDENT# raise TypeError ( 'Invalid data type for parameters. Must be a JSON string or a dictionary.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( secret ) != type ( '' ) ) : #NEWLINE# #INDENT# raise TypeError ( 'Invalid data type for secret. Must be a string.' ) #NEWLINE# #UNINDENT# #UNINDENT# if ( type ( self ) == type ( '' ) ) : #NEWLINE# #INDENT# parameters = json . loads ( parameters ) #NEWLINE# #UNINDENT# return ( parameters , secret )