<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def closest(self, vector, n=10, metric="cosine"):
 """Returns the closest n words to a vector Parameters ------- vector : numpy.array n : int (default 10) Returns ------- Tuple of 2 numpy.array: 1. position in self.vocab 2. cosine similarity """

        distances = distance(self.vectors, vector, metric=metric)
        best = np.argsort(distances)[::-1][1:n + 1]
        best_metrics = distances[best]
        return best, best_metrics