code: def __init__(
      self,
      api_params: ApiParams,
      metrics: Union[MetricIDType, Sequence[MetricIDType]],
  ):
      self.log = default_log(self)
      self.params = api_params
      self.metrics = metrics
      self.pipelines_cache: Optional[OperationsCache] = None
      self.preprocessing_cache: Optional[PreprocessingCache] = None
      self.timer = None
      # status flag indicating that composer step was applied
      self.was_optimised = False
      # status flag indicating that tuner step was applied`
      self.was_tuned = False
      self.init_cache()
  
imports: import datetime
  import gc
  from copy import deepcopy
  from typing import List, Optional, Sequence, Tuple, Union
  from golem.core.log import default_log
  from golem.core.optimisers.opt_history_objects.opt_history import OptHistory
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from fedot.api.api_utils.assumptions.assumptions_handler import AssumptionsHandler
  from fedot.api.api_utils.params import ApiParams
  from fedot.api.time import ApiTime
  from fedot.core.caching.pipelines_cache import OperationsCache
  from fedot.core.caching.preprocessing_cache import PreprocessingCache
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.composer.gp_composer.gp_composer import GPComposer
  from fedot.core.constants import DEFAULT_TUNING_ITERATIONS_NUMBER
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.metrics_repository import MetricIDType
label_desc: Use image node_id 1 to create a new ApiComposer object  with example: obj = ApiComposer(api_params, metrics)