def _append_distances(self, v, distance, candidates):
if distance:<EOL><INDENT>nv = unitvec(v)<EOL>candidates = [(x[<NUM_LIT:0>], x[<NUM_LIT:1>], self.distance.distance(x[<NUM_LIT:0>], nv)) for x<EOL>in candidates]<EOL><DEDENT>return candidates<EOL>
Apply distance implementation if specified