class_docstr: A wrapper class to apply sklearn clustering models on DocumentEmbeddings.
class_docstr_tok: ["A","wrapper","class","to","apply","sklearn","clustering","models","on","DocumentEmbeddings","."]
docstr: Predict labels given a list of sentences and returns the respective class indices.
  
  Args:
      corpus: the flair corpus this wrapper will use for predicting the labels.
docstr_tok: ["Predict","labels","given","a","list","of","sentences","and","returns","the","respective","class","indices",".","Args",":","corpus",":","the","flair","corpus","this","wrapper","will","use","for","predicting","the","labels","."]
code: def predict(self, corpus: Corpus):
      """Predict labels given a list of sentences and returns the respective class indices.
  
      Args:
          corpus: the flair corpus this wrapper will use for predicting the labels.
      """
      X = self._convert_dataset(corpus)
      log.info(
          "Start the prediction "
          + str(self.model)
          + " with "
          + str(len(X))
          + " Datapoints."
      )
      predict = self.model.predict(X)
  
      for idx, sentence in enumerate(
          _iter_dataset(corpus.get_all_sentences())
      ):
          sentence.set_label("cluster", str(predict[idx]))
  
      log.info("Finished prediction and labeled all sentences.")
      return predict
  
imports: import logging
  import pickle
  from collections import OrderedDict
  from pathlib import Path
  from typing import Optional, Union
  import joblib
  from sklearn.base import BaseEstimator, ClusterMixin
  from sklearn.metrics import normalized_mutual_info_score
  from tqdm import tqdm
  from flair.data import Corpus, _iter_dataset
  from flair.datasets import DataLoader
  from flair.embeddings import DocumentEmbeddings
label_desc: Use image node_id 3 for calling the ClusteringModel obj's underlying member method code with example usage: obj.predict(corpus) and returns: predict