code: def in_sample_fit_predict(
      pipeline, train_input, predict_input, horizon
  ) -> np.array:
      """Fit pipeline and make predictions (in-sample forecasting)"""
      pipeline.fit(train_input)
  
      predicted_main = in_sample_ts_forecast(
          pipeline=pipeline, input_data=predict_input, horizon=horizon
      )
      return predicted_main
  
file_path: FEDOT/examples/advanced/decompose/refinement_forecast_example.py
imports: import warnings
  import numpy
  import pandas
  from matplotlib import pyplot
  from sklearn.metrics import mean_squared_error, mean_absolute_error
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.ts_wrappers import in_sample_ts_forecast
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import TaskTypesEnum, Task, TsForecastingParams
  from fedot.core.utils import set_random_seed
label_desc: Use image node_id 4 for calling a global function with example usage: in_sample_fit_predict(pipeline, train_input, predict_input, horizon) and returns: predicted_main