code: def _extract_model_data(topic_model, docs, vocab):
      doc_topic_dists = np.vstack(
          topic_model.predict(docs, output_type="probabilities")
      )
  
      topics = _topics_as_df(topic_model)
      topic_term_dists = topics.T[vocab].values
  
      return {
          "topic_term_dists": topic_term_dists,
          "doc_topic_dists": doc_topic_dists,
      }
  
file_path: pyLDAvis/pyLDAvis/graphlab.py
imports: import funcy
  import numpy
  import pandas
  import graphlab
  import pyLDAvis
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_model_data(topic_model, docs, vocab) and returns: dict