<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chat(room=None, stream=None, **kwargs):
 """Quick setup for a chatroom. :param str room: Roomname, if not given, a random sequence is generated and printed. :param MediaStream stream: The media stream to share, if not given a CameraStream will be created. :rtype: WebRTCRoom """

    if room is None:
        room = _random_room()
        print("room =", room)
    if stream is None:
        stream = CameraStream()
    room = WebRTCRoomMqtt(stream=stream, room=room)
    box = widgets.HBox(children=[])
    widgets.jslink((room, 'streams'), (box, 'children'))
    display(box)
    return room