def METHOD_NAME(self, message: str) -> None:
    """Send message to gateway server."""
    if self.ws is None:
        loop = IOLoop.current()
        loop.add_future(self.ws_future, lambda future: self.METHOD_NAME(message))
    else:
        self._write_message(message)