<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def request_response(self, exchange, routing_key, message, properties=None, correlation_id=None, timeout=6):
 		""" 		This function wraps publish, and sets the properties necessary to allow end-to-end communication using the Rpc paradigm. 		This function assumes that the named exchange and routing_key combination will result in a AMQP queue to pickup the request, and 		reply using another AMQP message. To achieve this, the following properties are set, along with any custom properties: 		* correlation_id: a correlation_id is generated using register_response. It is assumed that the responding service will also provide 			the same id in the response. 		* reply_to: this is set to the internal RPC queue name, so we can pickup responses. 		The mandatory bit will be set on the message as a mechanism to detect if the message was delivered to a queue. 		This is to avoid needlessly waiting on a reply, when the message wasn't delivered in the first place. 		Parameters 		exchange: string 			Exchange to publish to. 		routing_key: string 			Routing key to use for this message. 		message: string 			Message to publish. 		properties: dict 			Properties to set on message. This parameter is optional, but if set, at least the following options must be set: 				content_type: string - what content_type to specify, default is 'text/plain'. 				delivery_mode: int - what delivery_mode to use. By default message are not persistent, but this can be 					set by specifying PERSISTENT_MESSAGE . 		correlation_id: string 			Custom correlation_id. This identifier is subject to the same semantics and logic as register_response(). 		timeout: int 			How many seconds to wait for a reply. If no reply is received, an MessageDeliveryTimeout is raised. Set to 			False to wait forever. 		"""

		if not properties:
			properties = {}
		properties['correlation_id'] = self.register_response(correlation_id)
		properties['reply_to'] = self.rpc_queue_name

		if not self.publish(exchange, routing_key, message, properties, mandatory=True):
			self.retrieve_response(properties['correlation_id'])
			raise MessageNotDelivered("Message was not delivered to a queue")

		start = int(time.time())

		## Newer versions of pika (>v0.10) don't have a force_data_events any more
		if hasattr(self.channel, "force_data_events"):
			self.channel.force_data_events(True)

		while properties['correlation_id'] not in self.retrieve_available_responses():
			self.connection.process_data_events()
			if timeout and (int(time.time()) - start) > timeout:
				self.retrieve_response(properties['correlation_id'])
				raise MessageDeliveryTimeout("No response received from RPC server within specified period")

		return self.retrieve_response(properties['correlation_id'])