Kdtree subset query

@rgommers 
#4260 was merged despite not having any commits inside... So I am reissuing a PR

Formatting for all parameters and returns: spaces around ``:``