code: def generate_cascade_decompose_pipeline():
      """The function of generating a multi-stage model with many connections
      and solving many problems (regression and classification)
      """
  
      node_scaling = PipelineNode("scaling")
      node_second = PipelineNode("logit", nodes_from=[node_scaling])
      node_decompose = PipelineNode(
          "class_decompose", nodes_from=[node_second, node_scaling]
      )
      node_rfr = PipelineNode("rfr", nodes_from=[node_decompose])
      node_rf = PipelineNode("rf", nodes_from=[node_rfr, node_second])
      node_decompose_new = PipelineNode(
          "class_decompose", nodes_from=[node_rf, node_scaling]
      )
      node_rfr_2 = PipelineNode("rfr", nodes_from=[node_decompose_new])
      node_final = PipelineNode(
          "logit", nodes_from=[node_rfr_2, node_rf]
      )
      pipeline = Pipeline(node_final)
      return pipeline
  
imports: from itertools import product
  import numpy
  from examples.simple.classification.classification_with_tuning import get_classification_dataset
  from examples.advanced.decompose.refinement_forecast_example import get_refinement_pipeline
  from fedot.core.data.data import InputData
  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
  from fedot.preprocessing.preprocessing import DataPreprocessor
  from test.unit.tasks.test_classification import get_iris_data
  from test.unit.tasks.test_forecasting import get_ts_data
  from test.unit.preprocessing.test_preprocessors import data_with_complicated_types
label_desc: Use image node_id 3 for calling a global function with example usage: generate_cascade_decompose_pipeline() and returns: pipeline