code: def generate_pipeline_with_decomposition(
      primary_operation, secondary_operation
  ):
      """The function generates a pipeline in which there is an operation of
      decomposing the target variable into residuals
                       secondary_operation
      primary_operation                       rf
                       class_decompose -> rfr
  
      :param primary_operation: name of operation to place in primary node
      :param secondary_operation: name of operation to place in secondary node
      """
  
      node_first = PipelineNode(primary_operation)
      node_second = PipelineNode(
          secondary_operation, nodes_from=[node_first]
      )
      node_decompose = PipelineNode(
          "class_decompose", nodes_from=[node_second, node_first]
      )
      node_rfr = PipelineNode("rfr", nodes_from=[node_decompose])
      node_rf = PipelineNode("rf", nodes_from=[node_rfr, node_second])
      full_pipeline = Pipeline(node_rf)
      return full_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 1 for calling a global function with example usage: generate_pipeline_with_decomposition(primary_operation, secondary_operation) and returns: full_pipeline