docstr: Args:
      texts (list of str): list of texts
      threshold (float): If not None, documents with maximum topic scores
                          less than <threshold> are filtered out
      harden(bool): If True, each document is assigned to a single topic for which
                    it has the highest score
  Returns:
      if threshold is None:
          np.ndarray: topic distribution for each text document
      else:
          (np.ndarray, np.ndarray): topic distribution and boolean array
docstr_tok: ["Args",":","texts","(","list","of","str",")",":","list","of","texts","threshold","(","float",")",":","If","not","None",",","documents","with","maximum","topic","scores","less","than","<","threshold",">","are","filtered","out","harden","(","bool",")",":","If","True",",","each","document","is","assigned","to","a","single","topic","for","which","it","has","the","highest","score","Returns",":","if","threshold","is","None",":","np.ndarray",":","topic","distribution","for","each","text","document","else",":","(","np.ndarray",",","np.ndarray",")",":","topic","distribution","and","boolean","array"]
code: def predict(self, texts, threshold=None, harden=False):
      """
      Args:
          texts (list of str): list of texts
          threshold (float): If not None, documents with maximum topic scores
                              less than <threshold> are filtered out
          harden(bool): If True, each document is assigned to a single topic for which
                        it has the highest score
      Returns:
          if threshold is None:
              np.ndarray: topic distribution for each text document
          else:
              (np.ndarray, np.ndarray): topic distribution and boolean array
      """
      self._check_model()
      transformed_texts = self.vectorizer.transform(texts)
      X_topics = self.model.transform(transformed_texts)
      # if self.model_type == 'nmf':
      # scores = np.matrix(X_topics)
      # scores_normalized= scores/scores.sum(axis=1)
      # X_topics = scores_normalized
      _idx = np.array([True] * len(texts))
      if threshold is not None:
          _idx = (
              np.amax(X_topics, axis=1) > threshold
          )  # idx of doc that above the threshold
          _idx = np.array(_idx)
          X_topics = X_topics[_idx]
      if harden:
          X_topics = self._harden_topics(X_topics)
      if threshold is not None:
          return (X_topics, _idx)
      else:
          return X_topics
  
imports: import time
  from ..None import utils
  from ..imports import *
  from .None import preprocessor
  from .None import textutils
label_desc: Use image node_id 14 for calling the TopicModel obj's underlying member method code with example usage: obj.predict(texts, threshold, harden) and returns: X_topics,  _idx, X_topics