def get_args(request_args, allowed_int_args=[], allowed_str_args=[]):
args = {}<EOL>for allowed_int_arg in allowed_int_args:<EOL><INDENT>int_value = request_args.get(allowed_int_arg, default=None, type=None)<EOL>if int_value:<EOL><INDENT>args[allowed_int_arg] = int(int_value)<EOL><DEDENT><DEDENT>for allowed_str_arg in allowed_str_args:<EOL><INDENT>str_value = request_args.get(allowed_str_arg, default=None, type=None)<EOL>if str_value:<EOL><INDENT>args[allowed_str_arg] = str_value<EOL><DEDENT><DEDENT>return args<EOL>
Check allowed argument names and return is as dictionary