class_docstr: Repository in order to extract suitable operations by keys
  for pipelines during graph composition. Defines 2 keys:
  `primary` and `secondary` for distinguishing operations suitable
  for, respectively, primary and secondary nodes.
  
  Designed to work in cooperation with
  :py:class:`fedot.core.optimisers.opt_node_factory.OptNodeFactory`
  
  Args:
     operations_by_keys: available operations already splitted by keys
class_docstr_tok: ["Repository","in","order","to","extract","suitable","operations","by","keys","for","pipelines","during","graph","composition",".","Defines","2","keys",":","`","primary","`","and","`","secondary","`","for","distinguishing","operations","suitable","for",",","respectively",",","primary","and","secondary","nodes",".","Designed","to","work","in","cooperation","with",":","py",":","class",":","`","fedot.core.optimisers.opt_node_factory.OptNodeFactory","`","Args",":","operations_by_keys",":","available","operations","already","splitted","by","keys"]
docstr: Function divide operations for primary and secondary 
docstr_tok: ["Function","divide","operations","for","primary","and","secondary"]
code: def divide_operations(available_operations, task):
      """Function divide operations for primary and secondary"""
  
      if task.task_type is TaskTypesEnum.ts_forecasting:
          # Get time series operations for primary nodes
          ts_data_operations = get_operations_for_task(
              task=task, mode="data_operation", tags=["non_lagged"]
          )
          # Remove exog data operation from the list
          ts_data_operations.remove("exog_ts")
  
          ts_primary_models = get_operations_for_task(
              task=task, mode="model", tags=["non_lagged"]
          )
          # Union of the models and data operations
          ts_primary_operations = ts_data_operations + ts_primary_models
  
          # Filter - remain only operations, which were in available ones
          primary_operations = sorted(
              list(
                  set(ts_primary_operations).intersection(
                      available_operations
                  )
              )
          )
          secondary_operations = available_operations
      else:
          primary_operations = available_operations
          secondary_operations = available_operations
      return primary_operations, secondary_operations
  
file_path: FEDOT/fedot/core/repository/pipeline_operation_repository.py
imports: import itertools
  from typing import List, Optional, Dict
  from fedot.api.api_utils.presets import OperationsPreset
  from fedot.core.repository.graph_operation_repository import GraphOperationRepository
  from fedot.core.repository.operation_types_repository import get_operations_for_task
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 5 for calling the PipelineOperationRepository obj's underlying member method code with example usage: obj.divide_operations(available_operations, task) and returns: primary_operations,  secondary_operations