class_docstr: Base class used for composite model structure definition
  
  Args:
      nodes: :obj:`PipelineNode` object(s)
      use_input_preprocessing: whether to do input preprocessing or not, ``True`` by default.
class_docstr_tok: ["Base","class","used","for","composite","model","structure","definition","Args",":","nodes",":",":","obj",":","`","PipelineNode","`","object","(","s",")","use_input_preprocessing",":","whether","to","do","input","preprocessing","or","not",",","``","True","``","by","default","."]
docstr: Runs the predict process in all of the pipeline nodes starting with root
  
  input_data: data for prediction
  output_mode: desired form of output for operations
  
      .. details:: possible ``output_mode`` options:
  
          - ``default`` -> (as is, default)
          - ``labels`` -> (numbers of classes - for classification)
          - ``probs`` -> (probabilities - for classification == default)
          - ``full_probs`` -> (return all probabilities - for binary classification)
  
  Returns:
      OutputData: values predicted on the provided ``input_data``
docstr_tok: ["Runs","the","predict","process","in","all","of","the","pipeline","nodes","starting","with","root","input_data",":","data","for","prediction","output_mode",":","desired","form","of","output","for","operations","..","details",":",":","possible","``","output_mode","``","options",":","-","``","default","``","-",">","(","as","is",",","default",")","-","``","labels","``","-",">","(","numbers","of","classes","-","for","classification",")","-","``","probs","``","-",">","(","probabilities","-","for","classification","==","default",")","-","``","full_probs","``","-",">","(","return","all","probabilities","-","for","binary","classification",")","Returns",":","OutputData",":","values","predicted","on","the","provided","``","input_data","``"]
code: def predict(
      self,
      input_data: Union[InputData, MultiModalData],
      output_mode: str = "default",
  ) -> OutputData:
      """Runs the predict process in all of the pipeline nodes starting with root
  
      input_data: data for prediction
      output_mode: desired form of output for operations
  
          .. details:: possible ``output_mode`` options:
  
              - ``default`` -> (as is, default)
              - ``labels`` -> (numbers of classes - for classification)
              - ``probs`` -> (probabilities - for classification == default)
              - ``full_probs`` -> (return all probabilities - for binary classification)
  
      Returns:
          OutputData: values predicted on the provided ``input_data``
      """
  
      if not self.is_fitted:
          ex = "Pipeline is not fitted yet"
          self.log.error(ex)
          raise ValueError(ex)
  
      if (
          isinstance(input_data, InputData)
          and input_data.supplementary_data.is_auto_preprocessed
      ):
          copied_input_data = deepcopy(input_data)
      else:
          # Make copy of the input data to avoid performing inplace operations
          copied_input_data = self._preprocess(
              input_data, is_fit_stage=False
          )
  
      copied_input_data = self._assign_data_to_nodes(copied_input_data)
      result = self.root_node.predict(
          input_data=copied_input_data, output_mode=output_mode
      )
  
      if input_data.task.task_type == TaskTypesEnum.ts_forecasting:
          result.predict = result.predict.ravel()
  
      result = self._postprocess(copied_input_data, result, output_mode)
      return result
  
imports: from copy import deepcopy
  from datetime import timedelta
  from os import PathLike
  from typing import Optional, Tuple, Union, Sequence, List, Dict
  import func_timeout
  from golem.core.dag.graph import Graph
  from golem.core.dag.graph_delegate import GraphDelegate
  from golem.core.dag.graph_node import GraphNode
  from golem.core.dag.graph_utils import distance_to_primary_level, graph_structure
  from golem.core.dag.linked_graph import LinkedGraph
  from golem.core.log import default_log
  from golem.core.optimisers.timer import Timer
  from golem.core.paths import copy_doc
  from golem.utilities.serializable import Serializable
  from golem.visualisation.graph_viz import NodeColorType
  from fedot.core.caching.pipelines_cache import OperationsCache
  from fedot.core.caching.preprocessing_cache import PreprocessingCache
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.operations.data_operation import DataOperation
  from fedot.core.operations.model import Model
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.template import PipelineTemplate
  from fedot.core.repository.tasks import TaskTypesEnum
  from fedot.core.visualisation.pipeline_specific_visuals import PipelineVisualizer
  from fedot.preprocessing.dummy_preprocessing import DummyPreprocessor
  from fedot.preprocessing.preprocessing import DataPreprocessor
label_desc: Use image node_id 12 for calling the Pipeline obj's underlying member method code with example usage: obj.predict(input_data, output_mode) and returns: result