code: def test_safety_label_correct():
      """
      Check if cutting and label encoding is used for  pseudo large data with categorical features with high cardinality
      """
      (
          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
      )
      assert (
          data.features.shape[0] * data.features.shape[1]
          <= api_safety.max_size
      )
      assert data.features.shape[1] == 3
      assert data.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 3 for calling a global function with example usage: test_safety_label_correct() without return types