def neighbours(self, v,<EOL>distance=None,<EOL>fetch_vector_filters=None,<EOL>vector_filters=None):
<EOL>candidates = self._get_candidates(v)<EOL>if fetch_vector_filters:<EOL><INDENT>candidates = self._apply_filter(fetch_vector_filters,<EOL>candidates)<EOL><DEDENT>if not distance:<EOL><INDENT>distance = self.distance<EOL><DEDENT>candidates = self._append_distances(v, distance, candidates)<EOL>if not vector_filters:<EOL><INDENT>vector_filters = self.vector_filters<EOL><DEDENT>candidates = self._apply_filter(vector_filters, candidates)<EOL>return candidates<EOL>
Hashes vector v, collects all candidate vectors from the matching
buckets in storage, applys the (optional) distance function and
finally the (optional) filter function to construct the returned list
of either (vector, data, distance) tuples or (vector, data) tuples.