code: def custom_model_imitation(_, idx, train_data, params):
      """
      Function imitates custom model behaviour
      :param train_data: np.array for training the model
      :param params: dict parameters for custom model calculation
      :return result: random np.array with the same shape as train_data,
                      but with linear transformation according to params
      """
      a = params.get("a")
      b = params.get("b")
      result = np.random.rand(*train_data.shape) * a + b
      out_type = "ts"
      if len(train_data.shape) > 1:
          out_type = "table"
      return result, out_type
  
imports: import logging
  import os
  import shutil
  from copy import deepcopy
  from typing import Any
  import numpy
  import pandas
  from examples.advanced.time_series_forecasting.custom_model_tuning import get_fitting_custom_pipeline
  from examples.simple.pipeline_import_export import create_correct_path
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
label_desc: Use image node_id 1 for calling a global function with example usage: custom_model_imitation(_, idx, train_data, params) and returns: result,  out_type