code: def test_recommendations_works_correct_in_final_fit():
      """
      Check if accept and apply recommendations works correct with new data object
      """
  
      (
          api_safety,
          api_preprocessor,
      ) = get_data_analyser_with_specific_params()
      data = get_small_cat_data()
      recs_for_data, _ = api_safety.give_recommendations(data)
      api_preprocessor.accept_and_apply_recommendations(
          data, recs_for_data
      )
  
      data_new = get_small_cat_data()
      if recs_for_data:
          # if data was cut we need to refit pipeline on full data
          api_preprocessor.accept_and_apply_recommendations(
              data_new,
              {k: v for k, v in recs_for_data.items() if k != "cut"},
          )
  
      assert data_new.features.shape[1] == 3
      assert data_new.features[0, 0] != "a"
  
file_path: FEDOT/test/unit/api/test_api_safety.py
imports: import numpy
  from fedot.api.api_utils.api_data import ApiDataProcessor
  from fedot.api.api_utils.input_analyser import InputAnalyser
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import TaskTypesEnum, Task
  from fedot.preprocessing.preprocessing import DataPreprocessor
  from test.integration.api.test_main_api import TESTS_MAIN_API_DEFAULT_PARAMS
label_desc: Use image node_id 4 for calling a global function with example usage: test_recommendations_works_correct_in_final_fit() without return types