code: def get_centered_pipeline(with_params=True) -> Pipeline:
      """
      lagged -> custom -> ridge
      """
      lagged_node = PipelineNode("lagged")
      custom_node = PipelineNode("custom", nodes_from=[lagged_node])
      if with_params:
          custom_node.parameters = {
              "a": -50,
              "b": 500,
              "model_predict": custom_model_imitation,
          }
  
      node_final = PipelineNode("ridge", nodes_from=[custom_node])
      pipeline = Pipeline(node_final)
      return pipeline
  
imports: import logging
  import os
  import shutil
  from copy import deepcopy
  from typing import Any
  import numpy
  import pandas
  from examples.advanced.time_series_forecasting.custom_model_tuning import get_fitting_custom_pipeline
  from examples.simple.pipeline_import_export import create_correct_path
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
label_desc: Use image node_id 2 for calling a global function with example usage: get_centered_pipeline(with_params) and returns: pipeline