code: def get_api_params_repository(
      task_type: Optional[TaskTypesEnum] = None,
  ):
      task_type = task_type or TaskTypesEnum.ts_forecasting
      params_repository = ApiParamsRepository(task_type)
      return params_repository
  
file_path: FEDOT/test/unit/api/test_api_params.py
imports: import dataclasses
  from typing import Optional
  import pytest
  from golem.core.optimisers.genetic.gp_optimizer import EvoGraphOptimizer
  from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.optimisers.genetic.operators.inheritance import GeneticSchemeTypesEnum
  from fedot.api.api_utils.api_params_repository import ApiParamsRepository
  from fedot.core.constants import AUTO_PRESET_NAME
  from fedot.core.pipelines.pipeline_builder import PipelineBuilder
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from fedot.core.repository.metrics_repository import RegressionMetricsEnum
  from fedot.core.repository.tasks import TaskTypesEnum
label_desc: Use image node_id 1 for calling a global function with example usage: get_api_params_repository(task_type) and returns: params_repository