def METHOD_NAME(name, method_name):
	dataset = dataset_map[name]
	expressions = json.loads(request.args["expressions"])
	expr = dataset(*expressions)
	if json.loads(request.args.get("masked", "false")):
		print "using masked"
		expr = expr.selected()
	method = getattr(expr, method_name)
	args, varargs, kwargs, defaults = inspect.getargspec(method)
	print inspect.getargspec(method)
	#args_required = args[:len(args)-len(defaults)]
	kwargs = {}
	for arg in args:
		if arg in request.args:
			kwargs[arg] = json.loads(request.args[arg])
	print "passing args", kwargs
	values = method(**kwargs)
	data = values.tolist()
	response= Response(json.dumps(data), status=200, mimetype='application/json')
	return response