code: def __init__(
      self,
      input_params: Dict[str, Any],
      problem: str,
      task_params: Optional[TaskParams] = None,
      n_jobs: int = -1,
      timeout: float = 5,
  ):
      self.log: LoggerAdapter = default_log(self)
      self.task: Task = self._get_task_with_params(problem, task_params)
      self.n_jobs: int = determine_n_jobs(n_jobs)
      self.timeout = timeout
  
      self._params_repository = ApiParamsRepository(self.task.task_type)
      parameters: dict = (
          self._params_repository.check_and_set_default_params(
              input_params
          )
      )
      super().__init__(parameters)
      self._check_timeout_vs_generations()
  
      self.composer_requirements = None
      self.graph_generation_params = None
      self.optimizer_params = None
  
imports: import datetime
  from collections import UserDict
  from copy import deepcopy, copy
  from typing import Any, Dict, Optional, Union
  from golem.core.log import LoggerAdapter, default_log
  from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.optimisers.optimizer import GraphGenerationParams
  from golem.utilities.utilities import determine_n_jobs
  from fedot.api.api_utils.api_params_repository import ApiParamsRepository
  from fedot.api.api_utils.presets import OperationsPreset
  from fedot.core.constants import AUTO_PRESET_NAME, DEFAULT_FORECAST_LENGTH
  from fedot.core.data.data import InputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.pipelines.adapters import PipelineAdapter
  from fedot.core.pipelines.pipeline_advisor import PipelineChangeAdvisor
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from fedot.core.pipelines.pipeline_node_factory import PipelineOptNodeFactory
  from fedot.core.pipelines.verification import rules_by_task
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.pipeline_operation_repository import PipelineOperationRepository
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TaskParams, TsForecastingParams
label_desc: Use image node_id 1 to create a new ApiParams object from inherited base classes: UserDict with example: obj = ApiParams(input_params, problem, task_params, n_jobs, timeout)