Can you try to pickle `nbrs_D` in the test? (Since you're using a `lambda`.)