<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_room_ids_for_address( self, address: Address, filter_private: bool = None, ) -> List[_RoomID]: """ Uses GMatrixClient.get_account_data to get updated mapping of address->rooms It'll filter only existing rooms. If filter_private=True, also filter out public rooms. If filter_private=None, filter according to self._private_rooms """

        address_hex: AddressHex = to_checksum_address(address)
        with self._account_data_lock:
            room_ids = self._client.account_data.get(
                'network.raiden.rooms',
                {},
            ).get(address_hex)
            self.log.debug('matrix get account data', room_ids=room_ids, for_address=address_hex)
            if not room_ids:  # None or empty
                room_ids = list()
            if not isinstance(room_ids, list):  # old version, single room
                room_ids = [room_ids]

            if filter_private is None:
                filter_private = self._private_rooms
            if not filter_private:
                # existing rooms
                room_ids = [
                    room_id
                    for room_id in room_ids
                    if room_id in self._client.rooms
                ]
            else:
                # existing and private rooms
                room_ids = [
                    room_id
                    for room_id in room_ids
                    if room_id in self._client.rooms and self._client.rooms[room_id].invite_only
                ]

            return room_ids