code: def reconnect(self):
          
          # This is the old connection instance, stop its ioloop.
          self._connection.ioloop.stop()
          if self._running:
              # Create a new connection
              self.connect()
              # There is now a new connection, needs the new ioloop to run.
              self._connection.ioloop.start()
docs: Will be invoked by the IOLoop timer if the connection is
          closed. See the _on_connection_close method.