code: def test_pipeline_preprocessing_through_api_correctly():
      """Preprocessing applying in two modules (places): API and pipeline.
      In API preprocessing there is an obligatory preparation for data.
      After API finish processing it returns pipeline which preprocessing module
      must be identical to preprocessing in api.
      """
      data = data_with_binary_features_and_categorical_target()
  
      fedot_model = Fedot(problem="classification")
      # Using API preprocessing and train pipeline to give forecasts
      pipeline = fedot_model.fit(data, predefined_model="dt")
      # Stand-alone pipeline with it's own preprocessing
      predicted = pipeline.predict(data, output_mode="labels")
  
      # check whether NaN-field was correctly predicted
      assert predicted.predict[3] == "red-blue"
  
file_path: FEDOT/test/unit/api/test_main_api.py
imports: import numpy
  import pandas
  import pytest
  from fedot import Fedot
  from fedot.api.api_utils.api_data import ApiDataProcessor
  from fedot.core.data.data import InputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.core.utils import fedot_project_root
  from test.data.datasets import data_with_binary_features_and_categorical_target, get_dataset, load_categorical_multidata, get_split_data_paths, get_split_data, get_multimodal_ts_data, load_categorical_unimodal
label_desc: Use image node_id 1 for calling a global function with example usage: test_pipeline_preprocessing_through_api_correctly() without return types