code: def test_custom_history_dir_define_correct():
      train_data, test_data, _ = get_dataset("ts_forecasting")
  
      custom_path = os.path.join(
          os.path.abspath(os.getcwd()), "history_dir"
      )
  
      params = {
          **TESTS_MAIN_API_DEFAULT_PARAMS,
          "history_dir": custom_path,
          "timeout": None,
          "num_of_generations": 1,
          "pop_size": 3,
      }
  
      model = Fedot(
          problem="ts_forecasting",
          **params,
          task_params=TsForecastingParams(forecast_length=5),
      )
  
      model.fit(features=train_data)
  
      assert len(os.listdir(custom_path)) != 0
      shutil.rmtree(custom_path)
  
imports: import os
  import shutil
  from copy import deepcopy
  import numpy
  import pandas
  import pytest
  from golem.core.dag.graph_utils import graph_structure
  from sklearn.datasets import load_iris
  from sklearn.preprocessing import LabelEncoder
  from examples.simple.time_series_forecasting.ts_pipelines import ts_complex_ridge_smoothing_pipeline
  from fedot import Fedot
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.tasks import TsForecastingParams
  from test.data.datasets import get_dataset, get_multimodal_ts_data, load_categorical_unimodal, load_categorical_multidata
  from test.unit.common_tests import is_predict_ignores_target
  from test.unit.tasks.test_multi_ts_forecast import get_multi_ts_data
label_desc: Use image node_id 15 for calling a global function with example usage: test_custom_history_dir_define_correct() without return types