code: def _combine_parents(
      parent_nodes: List[PipelineNode],
      input_data: Optional[InputData],
      parent_operation: str,
  ) -> Tuple[List[OutputData], np.array]:
      """Combines predictions from the ``parent_nodes``
  
      Args:
          parent_nodes: list of parent nodes, from which predictions will be combined
          input_data: input data from pipeline abstraction (source input data)
          parent_operation: name of parent operation (``'fit'`` or ``'predict'``)
  
      Returns:
          Tuple[List[OutputData], np.array]: :obj:`output data list from parent nodes`,
          :obj:`target for final pipeline prediction`
      """
  
      if input_data is not None:
          # InputData was set to pipeline
          target = input_data.target
      parent_results = []
      for parent in parent_nodes:
          if parent_operation == "predict":
              prediction = parent.predict(input_data=input_data)
              parent_results.append(prediction)
          elif parent_operation == "fit":
              prediction = parent.fit(input_data=input_data)
              parent_results.append(prediction)
          else:
              raise ValueError(
                  "Value parent_operation should be 'fit' or 'predict'"
              )
          if input_data is None:
              # InputData was set to primary nodes
              target = prediction.target
  
      return parent_results, target
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  from golem.core.dag.linked_graph_node import LinkedGraphNode
  from golem.core.log import default_log
  from golem.core.optimisers.timer import Timer
  from golem.serializers.serializer import register_serializable
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.merge.data_merger import DataMerger
  from fedot.core.operations.factory import OperationFactory
  from fedot.core.operations.operation import Operation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.operation_types_repository import OperationTypesRepository
  from fedot.core.utils import DEFAULT_PARAMS_STUB, NESTED_PARAMS_LABEL
label_desc: Use image node_id 1 for calling a global function with example usage: _combine_parents(parent_nodes, input_data, parent_operation) and returns: parent_results,  target