<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_group(self, groupname, statements):
 		""" 		Adds a group 		@type groupname: bytes 		@type statements: str 		"""

		msg = OmapiMessage.open(b"group")
		msg.message.append(("create", struct.pack("!I", 1)))
		msg.obj.append(("name", groupname))
		msg.obj.append(("statements", statements))
		response = self.query_server(msg)
		if response.opcode != OMAPI_OP_UPDATE:
			raise OmapiError("add group failed")