code: def test_data_preprocessor_performs_optional_data_preprocessing_only_once():
      input_data = data_with_only_categorical_features()
      preprocessor = DataPreprocessor()
      pipeline = Pipeline(PipelineNode("ridge"))
  
      preprocessed_data = preprocessor.optional_prepare_for_fit(
          pipeline, input_data
      )
  
      other_pipeline = Pipeline(PipelineNode("dt"))
      preprocessed_data_same = preprocessor.optional_prepare_for_fit(
          other_pipeline, preprocessed_data
      )
  
      assert id(preprocessed_data) == id(preprocessed_data_same)
      _assert_equal_data(preprocessed_data, preprocessed_data_same)
  
file_path: FEDOT/test/integration/preprocessing/test_pipeline_preprocessing.py
imports: from typing import Tuple, Callable
  import pandas
  import pytest
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.preprocessing.dummy_preprocessing import DummyPreprocessor
  from fedot.preprocessing.preprocessing import DataPreprocessor
  from test.unit.preprocessing.test_pipeline_preprocessing import data_with_mixed_types_in_each_column, data_with_only_categorical_features
label_desc: Use image node_id 6 for calling a global function with example usage: test_data_preprocessor_performs_optional_data_preprocessing_only_once() without return types