You have invited $2017$ of your acquaintances to a party. But after they all arrive, you come to know from a reliable source that each of your guests is either a troll or a true friend. You don't know who is what, but you do know the following:
A true friend always tells the truth in answer to any yes/no question.
A troll gives a random response, which may be true, false, or neither.
Each of your guests know which of the guests are trolls and which are not.
Now obviously you don't want a bunch of trolls in your party, so you decide to play a party game.
In every round, you give a card to each of the guests present, which has a yes/no question written on it; you may ask different questions to different guests. After handing out the cards, you listen to the answers of the guests, and then expel a single guest, who then cannot return to the party. Note that you must expel someone in order to continue to the next round. The door through which the guest exits is fitted with a troll detector; whenever a person passes through the door, it shows whether the person is a troll or a true friend. After the guest goes out, you begin another round of the same procedure.
You may stop the game at any moment. But if you chance to turn out more than one true friend, you'll be deemed a social failure and nobody will ever come to you party again.
Can you make sure that all the trolls are expelled, without losing your social reputation?
Adapted from Tournament of Towns, Spring 2015.