code: def test_default_forecast():
      forecast_length = 2
      train_data, test_data, _ = get_dataset("ts_forecasting")
      model = Fedot(
          problem="ts_forecasting",
          **TESTS_MAIN_API_DEFAULT_PARAMS,
          task_params=TsForecastingParams(
              forecast_length=forecast_length
          ),
      )
      model.fit(train_data, predefined_model="auto")
      forecast = model.forecast()
  
      assert len(forecast) == forecast_length
      assert np.array_equal(model.test_data.idx, train_data.idx)
  
      metrics = model.get_metrics(
          metric_names=["rmse", "mae", "mape"],
          validation_blocks=1,
          target=test_data.target,
      )
  
      assert len(metrics) == 3
      assert all([m > 0 for m in metrics.values()])
  
      in_sample_forecast = model.predict(test_data, validation_blocks=1)
      metrics = model.get_metrics(
          metric_names=["mase", "mae", "mape"], validation_blocks=1
      )
      assert in_sample_forecast is not None
      assert all([m > 0 for m in metrics.values()])
  
file_path: FEDOT/test/unit/api/test_main_api.py
imports: import numpy
  import pandas
  import pytest
  from fedot import Fedot
  from fedot.api.api_utils.api_data import ApiDataProcessor
  from fedot.core.data.data import InputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.core.utils import fedot_project_root
  from test.data.datasets import data_with_binary_features_and_categorical_target, get_dataset, load_categorical_multidata, get_split_data_paths, get_split_data, get_multimodal_ts_data, load_categorical_unimodal
label_desc: Use image node_id 9 for calling a global function with example usage: test_default_forecast() without return types