code: def exception_if_not_ts_task(task):
      if task.task_type is not TaskTypesEnum.ts_forecasting:
          raise ValueError(
              "Method forecast is available only for time series forecasting task"
          )
  
file_path: FEDOT/fedot/core/pipelines/ts_wrappers.py
imports: import math
  from copy import copy
  from typing import Union, Optional
  import numpy
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.operations.evaluation.operation_implementations.data_operations.ts_transformations import ts_to_table
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import TaskTypesEnum
label_desc: Use image node_id 8 for calling a global function with example usage: exception_if_not_ts_task(task) without return types