code: def _filter_operations_by_type(repository, task):
      """Function filter operations in repository by task
  
      :param repository: repository with operations to filter
      :param task: task type, if None, return all models
  
      :return repository_operations_list: list with filtered operations
      """
  
      if task is None:
          # Return all operations
          repository_operations_list = repository.operations
      else:
          repository_operations_list = []
          for operation in repository.operations:
              # Every operation can have several compatible task types
              task_types = operation.task_type
              if any(task == task_type for task_type in task_types):
                  repository_operations_list.append(operation)
  
      return repository_operations_list
  
file_path: FEDOT/fedot/api/help.py
imports: from fedot.core.pipelines.tuning.search_space import PipelineSearchSpace
  from fedot.core.repository.operation_types_repository import OperationTypesRepository
  from fedot.core.repository.tasks import TaskTypesEnum
label_desc: Use image node_id 3 for calling a global function with example usage: _filter_operations_by_type(repository, task) and returns: repository_operations_list