def METHOD_NAME (groupName, groupQueries, allEnums):
	yield ""
	yield "int get%sNumArgs (int pname)" % groupName
	yield "{"
	yield "\tswitch(pname)"
	yield "\t{"
	def genCases ():
		for enumName, enumQueryNumOutputs in groupQueries:
			if enumName in allEnums:
				yield "case %s:\treturn %s;" % (enumName, enumQueryNumOutputs)
			else:
				print("Warning: %s not defined, skipping" % enumName)
		yield "default:\treturn 1;"
	for caseLine in indentLines(genCases()):
		yield "\t\t" + caseLine
	yield "\t}"
	yield "}"