code: def test_preprocessing_binary_categorical_train_test_correct():
      """Generate tabular InputData with categorical features with only two values (binary).
      During preprocessing such a features must be converted into int values. The same mapping
      should be performed on test part.
  
      The dataset used below has an important property. The first feature in train will always
      be binary (a + b, or a + c, etc.), but a new category (a or c pr b) will appear in the test.
      So it is needed to extend dictionary for Label encoder.
      """
      pipeline = Pipeline(PipelineNode("ridge"))
      categorical_data = data_with_only_categorical_features()
      train_data, test_data = train_test_data_setup(categorical_data)
  
      pipeline.fit(train_data)
      prediction = pipeline.predict(test_data)
      assert prediction is not None
  
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 7 for calling a global function with example usage: test_preprocessing_binary_categorical_train_test_correct() without return types