class_docstr: Create topic model widget.
docstr: Obtains topic distributions (LDA model) or scores (LSA/NMF model).
  
  Returns:
      doc_topics: Array of topic distributions (LDA model) or scores (LSA/NMF model)
code: def get_topic_nums(self):
      """Obtains topic distributions (LDA model) or scores (LSA/NMF model).
  
      Returns:
          doc_topics: Array of topic distributions (LDA model) or scores (LSA/NMF model)
      """
      if self._model_type == "NMF" or self._model_type == "SVD":
          return self._model.transform(self._matrix)
      elif self._model_type == "LDA":
          doc_topics = []
          for doc in list(
              self._model.get_document_topics(
                  self._corpus, minimum_probability=0
              )
          ):
              current_doc = [topic[1] for topic in doc]
              doc_topics.append(current_doc)
          return np.array(doc_topics)
      elif self._model_type == "LSI" or self._model_type == "LSA":
          doc_topics = []
          for doc in self._model[self._corpus]:
              current_doc = [topic[1] for topic in doc]
              if current_doc:
                  doc_topics.append(current_doc)
              else:
                  doc_topics.append([0] * len(self._model.get_topics()))
          return np.array(doc_topics)
  
imports: import warnings
  from typing import List, Optional, Dict, Tuple, TYPE_CHECKING
  import pandas
  import numpy
  from sklearn.decomposition import TruncatedSVD, NMF
  import matplotlib.pyplot
  import seaborn
  from data_describe.config._config import get_option
  from data_describe.text.text_preprocessing import create_doc_term_matrix, create_tfidf_matrix, filter_dictionary
  from data_describe.backends import _get_viz_backend
  from data_describe.compat import _compat, _requires, _in_notebook
  from data_describe._widget import BaseWidget
label_desc: Use image node_id 19 for calling the TopicModelWidget obj's underlying member method code with example usage: obj.get_topic_nums() and returns: self, np, np