Python Kd Tree Query Definition Software