def METHOD_NAME(self, sid, namespace):
    """Return the rooms a client is in."""
    r = []
    try:
        for room_name, room in self.rooms[namespace].items():
            if room_name is not None and sid in room:
                r.append(room_name)
    except KeyError:
        pass
    return r