'Get all the rooms for this user where the membership for this user
matches one in the membership list.
Args:
user_id (str): The user ID.
membership_list (list): A list of synapse.api.constants.Membership
values which the user must be in.
Returns:
A list of dictionary objects, with room_id, membership and sender
defined.'

def get_rooms_for_user_where_membership_is(self, user_id, membership_list):

    if (not membership_list):
        return defer.succeed(None)
    return self.runInteraction('get_rooms_for_user_where_membership_is', self._get_rooms_for_user_where_membership_is_txn, user_id, membership_list)
