code: def test_top_topic_terms_topics(vectorizer, model):
      assert (
          len(
              list(
                  model.top_topic_terms(
                      vectorizer.id_to_term, topics=-1
                  )
              )
          )
          == model.n_topics
      )
      assert (
          len(
              list(
                  model.top_topic_terms(vectorizer.id_to_term, topics=0)
              )
          )
          == 1
      )
      observed = [
          topic_idx
          for topic_idx, _ in model.top_topic_terms(
              vectorizer.id_to_term, topics=(1, 2, 3)
          )
      ]
      expected = [1, 2, 3]
      assert observed == expected
  
imports: import numpy
  import pytest
  from sklearn.decomposition import NMF, LatentDirichletAllocation, TruncatedSVD
  from textacy import Corpus
  from textacy import extract
  from textacy.tm import TopicModel
  from textacy.representations import Vectorizer
label_desc: Use image node_id 12 for calling a global function with example usage: test_top_topic_terms_topics(vectorizer, model) without return types