code: def __check_multitask_operation_location(
      pipeline: Pipeline, operations_for_classification: list
  ):
      """
      Investigate paths for different tasks in the pipeline. If the pipeline solves
      several tasks simultaneously and there are no transitive operations in its
      structure (e.g. class_decompose), then the side branches must start from the
      primary node (nodes)
      """
      # TODO refactor to implement check via PipelineStructureExplorer
      primary_operations = []
      for node in pipeline.nodes:
          if isinstance(node, PipelineNode) and node.is_primary:
              primary_operations.append(node.operation.operation_type)
  
      primary_operations = set(primary_operations)
      unique_primary_operations_number = len(primary_operations)
  
      primary_operations_for_classification = set(
          operations_for_classification
      ).intersection(primary_operations)
  
      if unique_primary_operations_number != len(
          primary_operations_for_classification
      ):
          # There are difference in tasks are in the primary nodes
          return True
      else:
          raise ValueError(
              f"{ERROR_PREFIX} Current pipeline can not solve multitask problem"
          )
  
imports: from typing import Optional
  from fedot.core.operations.atomized_model import AtomizedModel
  from fedot.core.operations.model import Model
  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.operation_types_repository import OperationTypesRepository, get_operations_for_task, atomized_model_type
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 18 for calling a global function with example usage: __check_multitask_operation_location(pipeline, operations_for_classification) and returns: True