docs: def join_room(room, sid=None, namespace=None):
      """Join a room.
  
      This function puts the user in a room, under the current namespace. The
      user and the namespace are obtained from the event context. This is a
      function that can only be called from a SocketIO event handler. Example::
  
          @socketio.on('join')
          def on_join(data):
              username = session['username']
              room = data['room']
              join_room(room)
              send(username + ' has entered the room.', room=room)
  
      :param room: The name of the room to join.
      :param sid: The session id of the client. If not provided, the client is
                  obtained from the request context.
      :param namespace: The namespace for the room. If not provided, the
                        namespace is obtained from the request context.
      """
      socketio = flask.current_app.extensions['socketio']
      sid = sid or flask.request.sid
      namespace = namespace or flask.request.namespace
      socketio.server.enter_room(sid, room, namespace=namespace)