code: def correct_preprocessing_params(
      pipeline, categorical_max_uniques_th: int = None
  ):
      """
      Correct preprocessing classes parameters
  
      :param pipeline: pipeline without initialized preprocessors
      :param categorical_max_uniques_th: if number of unique values in the column lower, than
      threshold - convert column into categorical feature
      """
      table_corrector = TableTypesCorrector()
  
      if categorical_max_uniques_th is not None:
          table_corrector.categorical_max_uniques_th = (
              categorical_max_uniques_th
          )
      pipeline.preprocessor.types_correctors.update(
          {DEFAULT_SOURCE_NAME: table_corrector}
      )
      pipeline.preprocessor.binary_categorical_processors.update(
          {DEFAULT_SOURCE_NAME: BinaryCategoricalPreprocessor()}
      )
  
      return pipeline
  
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 2 for calling a global function with example usage: correct_preprocessing_params(pipeline, categorical_max_uniques_th) and returns: pipeline