code: def get_fitting_custom_pipeline():
      """
      Pipeline looking like this
      lagged -> custom -> ridge
      """
      lagged_node = PipelineNode("lagged")
      lagged_node.parameters = {"window_size": 50}
  
      # For custom model params as initial approximation and model as function is necessary
      custom_node = PipelineNode("custom", nodes_from=[lagged_node])
      custom_node.parameters = {
          "alpha": 5,
          "model_predict": custom_ml_model_imitation_predict,
          "model_fit": custom_ml_model_imitation_fit,
      }
  
      node_final = PipelineNode("lasso", nodes_from=[custom_node])
      pipeline = Pipeline(node_final)
  
      return pipeline
  
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from hyperopt import hp
  from sklearn.linear_model import Ridge
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.tuning.search_space import PipelineSearchSpace
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import RegressionMetricsEnum
  from fedot.core.repository.tasks import TaskTypesEnum, Task, TsForecastingParams
label_desc: Use image node_id 5 for calling a global function with example usage: get_fitting_custom_pipeline() and returns: pipeline