code: def cnn_composite_pipeline(composite_flag: bool = True) -> Pipeline:
      """
      Returns pipeline with the following structure:
  
      .. image:: img_classification_pipelines/cnn_composite_pipeline.png
        :width: 55%
  
      Where cnn - convolutional neural network, rf - random forest
  
      :param composite_flag:  add additional random forest estimator
      """
      node_first = PipelineNode("cnn")
      node_first.parameters = {
          "architecture": "deep",
          "epochs": 15,
          "batch_size": 128,
      }
      node_second = PipelineNode("cnn")
      node_second.parameters = {
          "architecture_type": "simplified",
          "epochs": 10,
          "batch_size": 128,
      }
      node_final = PipelineNode(
          "rf", nodes_from=[node_first, node_second]
      )
  
      if not composite_flag:
          node_final = PipelineNode("rf", nodes_from=[node_first])
  
      pipeline = Pipeline(node_final)
      return pipeline
  
file_path: FEDOT/examples/simple/classification/classification_pipelines.py
imports: from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
label_desc: Use image node_id 1 for calling a global function with example usage: cnn_composite_pipeline(composite_flag) and returns: pipeline