code: def run_gapfilling_example():
      """
      This function runs an example of filling in gaps in synthetic data
  
      :return arrays_dict: dictionary with 4 keys ('ridge', 'local_poly',
      'batch_poly', 'linear') that can be used to get arrays without gaps
      :return gap_data: an array with gaps
      :return real_data: an array with actual values in gaps
      """
  
      # Get synthetic time series
      gap_data, real_data = get_array_with_gaps()
  
      # Filling in gaps using pipeline from FEDOT
      node_lagged = PipelineNode("lagged")
      node_lagged.parameters = {"window_size": 50}
      node_ridge = PipelineNode("ridge", nodes_from=[node_lagged])
      ridge_pipeline = Pipeline(node_ridge)
      ridge_gapfiller = ModelGapFiller(
          gap_value=-100.0, pipeline=ridge_pipeline
      )
      without_gap_arr_ridge = ridge_gapfiller.forward_inverse_filling(
          gap_data
      )
  
      # Filling in gaps using simple methods such as polynomial approximation
      simple_gapfill = SimpleGapFiller(gap_value=-100.0)
      without_gap_local_poly = simple_gapfill.local_poly_approximation(
          gap_data, 4, 150
      )
  
      without_gap_batch_poly = simple_gapfill.batch_poly_approximation(
          gap_data, 4, 150
      )
  
      without_gap_linear = simple_gapfill.linear_interpolation(gap_data)
  
      arrays_dict = {
          "ridge": without_gap_arr_ridge,
          "local_poly": without_gap_local_poly,
          "batch_poly": without_gap_batch_poly,
          "linear": without_gap_linear,
      }
      return arrays_dict, gap_data, real_data
  
file_path: FEDOT/examples/simple/time_series_forecasting/gapfilling.py
imports: import matplotlib.pyplot
  import numpy
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.node import PipelineNode
  from fedot.utilities.synth_dataset_generator import generate_synthetic_data
  from fedot.utilities.ts_gapfilling import ModelGapFiller, SimpleGapFiller
label_desc: Use image node_id 3 for calling a global function with example usage: run_gapfilling_example() and returns: arrays_dict,  gap_data,  real_data