Many query key

I don't understand what did you mean ?
What is special case for `if len(samples) == 1`.