code: def change_preset_based_on_initial_fit(
      timer: ApiTime, n_jobs: int
  ) -> str:
      """
      If preset was set as 'auto', based on initial pipeline fit time, appropriate one can be chosen
      """
      if timer.time_for_automl in [-1, None]:
          return BEST_QUALITY_PRESET_NAME
  
      # Change preset to appropriate one
  
      if timer.have_time_for_the_best_quality(n_jobs=n_jobs):
          # It is possible to train only few number of pipelines during optimization - use simplified preset
          return BEST_QUALITY_PRESET_NAME
      else:
          return FAST_TRAIN_PRESET_NAME
  
file_path: FEDOT/fedot/api/api_utils/presets.py
imports: from copy import copy
  from typing import Optional
  from fedot.api.time import ApiTime
  from fedot.core.constants import BEST_QUALITY_PRESET_NAME, FAST_TRAIN_PRESET_NAME, AUTO_PRESET_NAME
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.operation_types_repository import OperationTypesRepository, get_operations_for_task
  from fedot.core.repository.tasks import Task
label_desc: Use image node_id 1 for calling a global function with example usage: change_preset_based_on_initial_fit(timer, n_jobs) and returns: BEST_QUALITY_PRESET_NAME, BEST_QUALITY_PRESET_NAME, FAST_TRAIN_PRESET_NAME