code: def test_pipeline_with_encoder():
      """
      Check the correctness of pipeline fitting on data with gaps and categorical features.
      Pipeline has only encoding operation in it's structure. So imputation must be performed
      as preprocessing.
      """
      encoding_node = PipelineNode("one_hot_encoding")
      final_node = PipelineNode("knnreg", nodes_from=[encoding_node])
      final_node.parameters = {"n_neighbors": 20}
      pipeline = Pipeline(final_node)
  
      mixed_input = get_mixed_data(
          task=Task(TaskTypesEnum.regression), extended=True
      )
      # Train pipeline with knn model and then check
      pipeline.fit(mixed_input)
      knn_params = pipeline.nodes[0].parameters
  
      # The number of neighbors must be equal to half of the objects in the table.
      # This means that the row with nan has been adequately processed
      assert 3 == knn_params["n_neighbors"]
  
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 9 for calling a global function with example usage: test_pipeline_with_encoder() without return types