docstr: Returns document entries for supplied topic_ids.
  Documents returned are those whose primary topic is topic with given topic_id
  Args:
      topic_ids(list of ints): list of topid IDs where each id is in the range
                               of range(self.n_topics).
      doc_ids (list of ints): list of document IDs where each id is an index
                              into self.doctopics
      rank(bool): If True, the list is sorted first by topic_id (ascending)
                  and then ty topic probability (descending).
                  Otherwise, list is sorted by doc_id (i.e., the order
                  of texts supplied to self.build (which is the order of self.doc_topics).
  
  Returns:
      list of dicts:  list of dicts with keys:
                      'text': text of document
                      'doc_id': ID of document
                      'topic_proba': topic probability (or score)
                      'topic_id': ID of topic
docstr_tok: ["Returns","document","entries","for","supplied","topic_ids",".","Documents","returned","are","those","whose","primary","topic","is","topic","with","given","topic_id","Args",":","topic_ids","(","list","of","ints",")",":","list","of","topid","IDs","where","each","id","is","in","the","range","of","range","(","self.n_topics",")",".","doc_ids","(","list","of","ints",")",":","list","of","document","IDs","where","each","id","is","an","index","into","self.doctopics","rank","(","bool",")",":","If","True",",","the","list","is","sorted","first","by","topic_id","(","ascending",")","and","then","ty","topic","probability","(","descending",")",".","Otherwise",",","list","is","sorted","by","doc_id","(","i.e.",",","the","order","of","texts","supplied","to","self.build","(","which","is","the","order","of","self.doc_topics",")",".","Returns",":","list","of","dicts",":","list","of","dicts","with","keys",":","'text","'",":","text","of","document","'doc_id","'",":","ID","of","document","'topic_proba","'",":","topic","probability","(","or","score",")","'topic_id","'",":","ID","of","topic"]
code: def get_docs(self, topic_ids=[], doc_ids=[], rank=False):
      """
      Returns document entries for supplied topic_ids.
      Documents returned are those whose primary topic is topic with given topic_id
      Args:
          topic_ids(list of ints): list of topid IDs where each id is in the range
                                   of range(self.n_topics).
          doc_ids (list of ints): list of document IDs where each id is an index
                                  into self.doctopics
          rank(bool): If True, the list is sorted first by topic_id (ascending)
                      and then ty topic probability (descending).
                      Otherwise, list is sorted by doc_id (i.e., the order
                      of texts supplied to self.build (which is the order of self.doc_topics).
  
      Returns:
          list of dicts:  list of dicts with keys:
                          'text': text of document
                          'doc_id': ID of document
                          'topic_proba': topic probability (or score)
                          'topic_id': ID of topic
  
      """
      self._check_build()
      if not topic_ids:
          topic_ids = list(range(self.n_topics))
      result_texts = []
      for topic_id in topic_ids:
          if topic_id not in self.topic_dict:
              continue
          texts = [
              {
                  "text": tup[0],
                  "doc_id": tup[1],
                  "topic_proba": tup[2],
                  "topic_id": topic_id,
              }
              for tup in self.topic_dict[topic_id]
              if not doc_ids or tup[1] in doc_ids
          ]
          result_texts.extend(texts)
      if not rank:
          result_texts = sorted(result_texts, key=lambda x: x["doc_id"])
      return result_texts
  
imports: import time
  from ..None import utils
  from ..imports import *
  from .None import preprocessor
  from .None import textutils
label_desc: Use image node_id 11 for calling the TopicModel obj's underlying member method code with example usage: obj.get_docs(topic_ids, doc_ids, rank) and returns: result_texts