def validate_params(required, optional, params):
missing_fields = [x for x in required if x not in params]<EOL>if missing_fields:<EOL><INDENT>field_strings = "<STR_LIT:U+002CU+0020>".join(missing_fields)<EOL>raise Exception("<STR_LIT>" % field_strings)<EOL><DEDENT>disallowed_fields = [x for x in params if x not in optional and x not in required]<EOL>if disallowed_fields:<EOL><INDENT>field_strings = "<STR_LIT:U+002CU+0020>".join(disallowed_fields)<EOL>raise Exception("<STR_LIT>" % field_strings)<EOL><DEDENT>
Helps us validate the parameters for the request

:param valid_options: a list of strings of valid options for the
                      api request
:param params: a dict, the key-value store which we really only care about
               the key which has tells us what the user is using for the
               API request

:returns: None or throws an exception if the validation fails