docstr: print topics
  n_words(int): number of words to describe each topic
  show_counts(bool): If True, print topics with document counts, where
                     the count is the number of documents with that topic as primary.
docstr_tok: ["print","topics","n_words","(","int",")",":","number","of","words","to","describe","each","topic","show_counts","(","bool",")",":","If","True",",","print","topics","with","document","counts",",","where","the","count","is","the","number","of","documents","with","that","topic","as","primary","."]
code: def print_topics(self, n_words=10, show_counts=False):
      """
      print topics
      n_words(int): number of words to describe each topic
      show_counts(bool): If True, print topics with document counts, where
                         the count is the number of documents with that topic as primary.
      """
      topics = self.get_topics(n_words=n_words, as_string=True)
      if show_counts:
          self._check_build()
          topic_counts = sorted(
              [
                  (k, topics[k], len(v))
                  for k, v in self.topic_dict.items()
              ],
              key=lambda kv: kv[-1],
              reverse=True,
          )
          for idx, topic, count in topic_counts:
              print("topic:%s | count:%s | %s" % (idx, count, topic))
      else:
          for i, t in enumerate(topics):
              print("topic %s | %s" % (i, t))
      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 8 for calling the TopicModel obj's underlying member method code with example usage: obj.print_topics(n_words, show_counts) without return types