<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_connection_closed(self, connection, reply_code, reply_text):
 """This method is invoked by pika when the connection to RabbitMQ is closed unexpectedly. Since it is unexpected, we will reconnect to RabbitMQ if it disconnects. :param pika.TornadoConnection connection: Closed connection :param int reply_code: The server provided reply_code if given :param str reply_text: The server provided reply_text if given """

        start_state = self.state
        self.state = self.STATE_CLOSED
        if self.on_unavailable:
            self.on_unavailable(self)

        self.connection = None
        self.channel = None

        if start_state != self.STATE_CLOSING:
            LOGGER.warning('%s closed while %s: (%s) %s',
                           connection, self.state_description,
                           reply_code, reply_text)
            self._reconnect()