docstr: Trains a recommender that, given a single document, will return
  documents in the corpus that are semantically similar to it.
  
  Args:
      n_neighbors (int):
  Returns:
      None
docstr_tok: ["Trains","a","recommender","that",",","given","a","single","document",",","will","return","documents","in","the","corpus","that","are","semantically","similar","to","it",".","Args",":","n_neighbors","(","int",")",":","Returns",":","None"]
code: def train_recommender(self, n_neighbors=20, metric="minkowski", p=2):
      """
      Trains a recommender that, given a single document, will return
      documents in the corpus that are semantically similar to it.
  
      Args:
          n_neighbors (int):
      Returns:
          None
      """
      from sklearn.neighbors import NearestNeighbors
  
      rec = NearestNeighbors(
          n_neighbors=n_neighbors, metric=metric, p=p
      )
      probs = self.get_doctopics()
      rec.fit(probs)
      self.recommender = rec
      return
  
imports: import time
  from ..None import utils
  from ..imports import *
  from .None import preprocessor
  from .None import textutils
label_desc: Use image node_id 16 for calling the TopicModel obj's underlying member method code with example usage: obj.train_recommender(n_neighbors, metric, p) without return types