code: def test_pipeline_target_encoding_for_probs():
      """
      Pipeline's ability to correctly make predictions when probabilities return
      is being tested for categorical target
      """
      classification_data = data_with_categorical_target(with_nan=False)
  
      pipeline = Pipeline(PipelineNode("dt"))
      pipeline.fit(classification_data)
      predicted = pipeline.predict(
          classification_data, output_mode="probs"
      )
      predicted_probs = predicted.predict
  
      # label 'blue' - after LabelEncoder 1
      assert np.isclose(predicted_probs[0, 1], 1)
      # label 'da' - after LabelEncoder 2
      assert np.isclose(predicted_probs[1, 2], 1)
      # label 'ba' - after LabelEncoder 0
      assert np.isclose(predicted_probs[2, 0], 1)
      # label 'di' - after LabelEncoder 3
      assert np.isclose(predicted_probs[3, 3], 1)
  
imports: import numpy
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.supplementary_data import SupplementaryData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import TaskTypesEnum, Task
  from fedot.preprocessing.categorical import BinaryCategoricalPreprocessor
  from fedot.preprocessing.data_types import TableTypesCorrector
  from fedot.preprocessing.structure import DEFAULT_SOURCE_NAME
  from test.unit.data_operations.test_data_operations_implementations import get_mixed_data
  from test.unit.preprocessing.test_preprocessing_through_api import data_with_only_categorical_features, data_with_too_much_nans, data_with_spaces_and_nans_in_features, data_with_nans_in_target_column, data_with_nans_in_multi_target, data_with_categorical_target
label_desc: Use image node_id 11 for calling a global function with example usage: test_pipeline_target_encoding_for_probs() without return types