<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def most_frequent(self, k, inplace=False):
 """Only most frequent k words to be included in the embeddings."""

    vocabulary = self.vocabulary.most_frequent(k)
    vectors = np.asarray([self[w] for w in vocabulary])
    if inplace:
      self.vocabulary = vocabulary
      self.vectors = vectors
      return self
    return Embedding(vectors=vectors, vocabulary=vocabulary)