code: def test_pipeline_with_imputer():
      """
      Check the correctness of pipeline fitting on data with gaps and categorical features.
      Pipeline has only imputation operation in it's structure. So encoding must be performed
      as preprocessing.
      """
      imputation_node = PipelineNode("simple_imputation")
      final_node = PipelineNode("ridge", nodes_from=[imputation_node])
      pipeline = Pipeline(final_node)
  
      pipeline = correct_preprocessing_params(
          pipeline, categorical_max_uniques_th=5
      )
  
      mixed_input = get_mixed_data(
          task=Task(TaskTypesEnum.regression), extended=True
      )
      pipeline.fit(mixed_input)
  
      # Coefficients for ridge regression
      coefficients = pipeline.nodes[0].operation.fitted_operation.coef_
      # Linear must use 12 features - several of them are encoded ones
      assert coefficients.shape[1] == 12
  
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 8 for calling a global function with example usage: test_pipeline_with_imputer() without return types