code: def test_correct_api_dataset_with_text_preprocessing():
      """Check if dataset with text features preprocessing was performed correctly when API launch using."""
      funcs = [
          data_with_text_features,
          data_with_text_features_and_nans,
      ]
  
      # Check for all datasets
      for data_generator in funcs:
          input_data = data_generator()
          fedot_model = Fedot(problem="classification")
          fedot_model.fit(input_data, predefined_model="auto")
          predicted = fedot_model.predict(input_data)
  
          # Check the features were transformed during preprocessing
          assert fedot_model.prediction.features.shape[1] > 1
          assert (
              fedot_model.prediction.features.shape[0]
              == input_data.features.shape[0]
          )
  
          # Check if there is a text node in pipeline
          node_tags = [
              node.tags for node in fedot_model.current_pipeline.nodes
          ]
          assert any(
              "text" in current_tags for current_tags in node_tags
          )
          assert len(predicted) > 0
  
imports: import numpy
  from fedot import Fedot
  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.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.preprocessing.data_types import TYPE_TO_ID
label_desc: Use image node_id 12 for calling a global function with example usage: test_correct_api_dataset_with_text_preprocessing() without return types