code: def _eval_strategy_for_task(
      operation_type: str,
      current_task_type: TaskTypesEnum,
      operations_repo: OperationTypesRepository,
  ):
      """The function returns the strategy for the selected operation and task type.
      And if it is necessary, found acceptable strategy for operation
  
      Args:
          operation_type: name of operation, for example, ``'ridge'``
          current_task_type: task to solve
          operations_repo: repository with operations
  
      Returns:
          EvaluationStrategy: ``EvaluationStrategy`` class for this operation
      """
  
      # Get acceptable task types for operation
      operation_info = operations_repo.operation_info_by_id(
          operation_type
      )
  
      if operation_info is None:
          raise ValueError(
              f"{operation_type} is not implemented "
              f"in {operations_repo.repository_name}"
          )
  
      acceptable_task_types = operation_info.task_type
  
      # If the operation can't be used directly for the task type from data
      set_acceptable_types = set(acceptable_task_types)
      if current_task_type not in acceptable_task_types:
          # Search the supplementary task types, that can be included in pipeline
          # which solves main task
          globally_compatible_task_types = compatible_task_types(
              current_task_type
          )
          globally_set = set(globally_compatible_task_types)
  
          comp_types_acceptable_for_operation = sorted(
              list(set_acceptable_types.intersection(globally_set))
          )
          if len(comp_types_acceptable_for_operation) == 0:
              raise ValueError(
                  f"Operation {operation_type} can not be used as a part of {current_task_type}."
              )
          current_task_type = comp_types_acceptable_for_operation[0]
  
      strategy = operations_repo.operation_info_by_id(
          operation_type
      ).current_strategy(current_task_type)
      return strategy
  
imports: from abc import abstractmethod
  from typing import Any, Dict, Optional, Union
  from golem.core.log import default_log
  from golem.serializers.serializer import register_serializable
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.hyperparameters_preprocessing import HyperparametersPreprocessor
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.operation_types_repository import OperationMetaInfo
  from fedot.core.repository.operation_types_repository import OperationTypesRepository
  from fedot.core.repository.tasks import Task, TaskTypesEnum, compatible_task_types
  from fedot.utilities.custom_errors import AbstractMethodNotImplementError
label_desc: Use image node_id 1 for calling a global function with example usage: _eval_strategy_for_task(operation_type, current_task_type, operations_repo) and returns: strategy