class_docstr: Dictionary encapsulates the mapping between normalized words and their integer ids.
  
  Notable instance attributes:
  
  Attributes
  ----------
  token2id : dict of (str, int)
      token -> token_id. I.e. the reverse mapping to `self[token_id]`.
  cfs : dict of (int, int)
      Collection frequencies: token_id -> how many instances of this token are contained in the documents.
  dfs : dict of (int, int)
      Document frequencies: token_id -> how many documents contain this token.
  num_docs : int
      Number of documents processed.
  num_pos : int
      Total number of corpus positions (number of processed words).
  num_nnz : int
      Total number of non-zeroes in the BOW matrix (sum of the number of unique
      words per document over the entire corpus).
class_docstr_tok: ["Dictionary","encapsulates","the","mapping","between","normalized","words","and","their","integer","ids",".","Notable","instance","attributes",":","Attributes","--","--","--","--","--","token2id",":","dict","of","(","str",",","int",")","token","-",">","token_id",".","I.e",".","the","reverse","mapping","to","`","self","[","token_id","]","`",".","cfs",":","dict","of","(","int",",","int",")","Collection","frequencies",":","token_id","-",">","how","many","instances","of","this","token","are","contained","in","the","documents",".","dfs",":","dict","of","(","int",",","int",")","Document","frequencies",":","token_id","-",">","how","many","documents","contain","this","token",".","num_docs",":","int","Number","of","documents","processed",".","num_pos",":","int","Total","number","of","corpus","positions","(","number","of","processed","words",")",".","num_nnz",":","int","Total","number","of","non-zeroes","in","the","BOW","matrix","(","sum","of","the","number","of","unique","words","per","document","over","the","entire","corpus",")","."]
docstr: Return a list of the n most common words and their counts from the most common to the least.
  
  Words with equal counts are ordered in the increasing order of their ids.
  
  Parameters
  ----------
  n : int or None, optional
      The number of most common words to be returned. If `None`, all words in the dictionary
      will be returned. Default is `None`.
  
  Returns
  -------
  most_common : list of (str, int)
      The n most common words and their counts from the most common to the least.
docstr_tok: ["Return","a","list","of","the","n","most","common","words","and","their","counts","from","the","most","common","to","the","least",".","Words","with","equal","counts","are","ordered","in","the","increasing","order","of","their","ids",".","Parameters","--","--","--","--","--","n",":","int","or","None",",","optional","The","number","of","most","common","words","to","be","returned",".","If","`","None","`",",","all","words","in","the","dictionary","will","be","returned",".","Default","is","`","None","`",".","Returns","--","--","--","-","most_common",":","list","of","(","str",",","int",")","The","n","most","common","words","and","their","counts","from","the","most","common","to","the","least","."]
code: def most_common(
      self, n: Optional[int] = None
  ) -> List[Tuple[str, int]]:
      """Return a list of the n most common words and their counts from the most common to the least.
  
      Words with equal counts are ordered in the increasing order of their ids.
  
      Parameters
      ----------
      n : int or None, optional
          The number of most common words to be returned. If `None`, all words in the dictionary
          will be returned. Default is `None`.
  
      Returns
      -------
      most_common : list of (str, int)
          The n most common words and their counts from the most common to the least.
  
      """
      most_common = [
          (self[word], count)
          for word, count in sorted(
              self.cfs.items(), key=lambda x: (-x[1], x[0])
          )[:n]
      ]
      return most_common
  
imports: from collections import defaultdict
  from collections.abc import Mapping
  import logging
  import itertools
  from typing import Optional, List, Tuple
  from gensim import utils
label_desc: Use image node_id 21 for calling the Dictionary obj's underlying member method code with example usage: obj.most_common(n) and returns: most_common