```python
if 0 < d < neighbordist:
```