code: def test_predict_with_prob(
      self, example_sentence, loaded_pretrained_model
  ):
      loaded_pretrained_model.predict(
          example_sentence, return_probabilities_for_all_classes=True
      )
      assert len(
          example_sentence.get_labels(
              loaded_pretrained_model.label_type
          )
      ) == len(loaded_pretrained_model.label_dictionary)
      assert (
          sum(
              [
                  label.score
                  for label in example_sentence.get_labels(
                      loaded_pretrained_model.label_type
                  )
              ]
          )
          > 1 - 1e-5
      )
  
file_path: flair/tests/models/test_text_classifier.py
imports: import pytest
  import flair.datasets
  from flair.data import Sentence
  from flair.embeddings import DocumentRNNEmbeddings, FlairEmbeddings, WordEmbeddings
  from flair.models import TextClassifier
  from flair.samplers import ImbalancedClassificationDatasetSampler
  from flair.trainers import ModelTrainer
  from tests.model_test_utils import BaseModelTest
label_desc: Use image node_id 6 for calling the TestTextClassifier obj's underlying member method code with example usage: obj.test_predict_with_prob(example_sentence, loaded_pretrained_model) without return types