<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join_room(self, room_name):
 
 """ Connects to a given room 
 If it does not exist it is created"""
     
        logging.debug('Joining room {ro}'.format(ro=room_name))

        for room in self.rooms:
            if room.name == room_name:
                room.add_user(self)
                self._rooms[room_name] = room
                room.welcome(self)
                break
        else:
            room = Room(room_name)
            self.rooms.append(room)
            self._rooms[room_name] = room
            room.add_user(self)