def _get_child_candidates(self, distance, min_dist, max_dist):
    if self._leftchild and distance - max_dist < self._median:
        yield self._leftchild
if self._rightchild and distance + max_dist >= self._median:
    yield self._rightchild
Можно ли определить функцию с точечным именем в Python?