class_docstr: Helper class for :class:`gensim.models.hdpmodel.HdpModel` to format the output of topics.
class_docstr_tok: ["Helper","class","for",":","class",":","`","gensim.models.hdpmodel.HdpModel","`","to","format","the","output","of","topics","."]
docstr: Print the `topn` most probable words from topic id `topic_id`.
  
  Warnings
  --------
  The parameter `num_words` is deprecated, will be removed in 4.0.0, please use `topn` instead.
  
  Parameters
  ----------
  topic_id : int
      Acts as a representative index for a particular topic.
  topn : int, optional
      Number of most probable words to show from given `topic_id`.
  num_words : int, optional
      DEPRECATED, USE `topn` INSTEAD.
  
  Returns
  -------
  list of (str, numpy.float) **or** list of str
      Output format for terms from a single topic depends on the value of `formatted` parameter.
code: def print_topic(self, topic_id, topn=None, num_words=None):
      """Print the `topn` most probable words from topic id `topic_id`.
  
      Warnings
      --------
      The parameter `num_words` is deprecated, will be removed in 4.0.0, please use `topn` instead.
  
      Parameters
      ----------
      topic_id : int
          Acts as a representative index for a particular topic.
      topn : int, optional
          Number of most probable words to show from given `topic_id`.
      num_words : int, optional
          DEPRECATED, USE `topn` INSTEAD.
  
      Returns
      -------
      list of (str, numpy.float) **or** list of str
          Output format for terms from a single topic depends on the value of `formatted` parameter.
  
      """
      if num_words is not None:  # deprecated num_words is used
          warnings.warn(
              "The parameter `num_words` is deprecated, will be removed in 4.0.0, please use `topn` instead."
          )
          topn = num_words
  
      return self.show_topic(topic_id, topn, formatted=True)
  
imports: import logging
  import time
  import warnings
  import numpy
  from scipy.special import gammaln, psi
  from gensim import interfaces, utils, matutils
  from gensim.matutils import dirichlet_expectation, mean_absolute_difference
  from gensim.models import basemodel, ldamodel
  from gensim.utils import deprecated
label_desc: Use image node_id 4 for calling the HdpTopicFormatter obj's underlying member method code with example usage: obj.print_topic(topic_id, topn, num_words) and returns: self