code: def test_api_fit_predict_with_pseudo_large_dataset_with_label_correct():
      """
      Test if safe mode in API cut large data and use LabelEncoder for features with high cardinality
      """
      model = Fedot(
          problem="classification", preset="fast_train", safe_mode=True
      )
      model.data_analyser.max_cat_cardinality = 5
      model.data_analyser.max_size = 18
      data = get_small_cat_data()
      pipeline = model.fit(features=data, predefined_model="auto")
      pipeline.predict(data)
      model.predict(features=data)
  
      # there should be only tree like models + data operations
      assert len(model.params.get("available_operations")) == 5
      assert "logit" not in model.params.get("available_operations")
  
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 6 for calling a global function with example usage: test_api_fit_predict_with_pseudo_large_dataset_with_label_correct() without return types