code: def has_correct_location_of_resample(pipeline: Pipeline):
      """
      Pipeline can have only one resample operation located in start of the pipeline
  
      :param pipeline: pipeline for checking
      """
      is_resample_primary = False
      is_not_resample_primary = False
      for node in pipeline.nodes:
          if node.is_primary:
              if node.name == "resample":
                  is_resample_primary = True
              else:
                  is_not_resample_primary = True
          else:
              if node.name == "resample":
                  raise ValueError(
                      f"{ERROR_PREFIX} Pipeline can have only one resample operation located in start of the pipeline"
                  )
      if is_resample_primary and is_not_resample_primary:
          raise ValueError(
              f"{ERROR_PREFIX} Pipeline can have only one resample operation located in start of the pipeline"
          )
      return True
  
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 7 for calling a global function with example usage: has_correct_location_of_resample(pipeline) and returns: True