code: def get_dataset(
      task_type: str,
      validation_blocks: Optional[int] = None,
      n_samples: int = 200,
      n_features: int = 8,
      forecast_length: int = 5,
      iris_dataset=True,
  ):
      if task_type == "regression":
          data = get_synthetic_regression_data(
              n_samples=n_samples,
              n_features=n_features,
              random_state=42,
          )
          train_data, test_data = train_test_data_setup(data)
          threshold = np.std(test_data.target) * 0.05
      elif task_type == "classification":
          if iris_dataset:
              data = get_iris_data()
          else:
              data = get_synthetic_classification_data(
                  n_samples=n_samples,
                  n_features=n_features,
                  random_state=42,
              )
          train_data, test_data = train_test_data_setup(
              data, shuffle=True
          )
          threshold = 0.95
      elif task_type == "clustering":
          data = get_synthetic_input_data(n_samples=100)
          train_data, test_data = train_test_data_setup(data)
          threshold = 0.5
      elif task_type == "ts_forecasting":
          train_data, test_data = get_ts_data(
              forecast_length=forecast_length,
              validation_blocks=validation_blocks,
          )
          threshold = np.std(test_data.target)
      else:
          raise ValueError("Incorrect type of machine learning task")
      return train_data, test_data, threshold
  
imports: import os
  from typing import Optional
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  from cases.metocean_forecasting_problem import prepare_input_data
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.supplementary_data import SupplementaryData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import fedot_project_root
  from test.integration.models.test_split_train_test import get_synthetic_input_data
  from test.unit.tasks.test_classification import get_iris_data, get_synthetic_classification_data
  from test.unit.tasks.test_forecasting import get_ts_data
  from test.unit.tasks.test_regression import get_synthetic_regression_data
label_desc: Use image node_id 4 for calling a global function with example usage: get_dataset(task_type, validation_blocks, n_samples, n_features, forecast_length, iris_dataset) and returns: train_data,  test_data,  threshold