Quadtree implementation for Python