class_docstr: Class used for filling in the gaps in time series
  
  Args:
      gap_value: value, which mask gap elements in array
      pipeline: TsForecastingPipeline object for filling in the gaps
class_docstr_tok: ["Class","used","for","filling","in","the","gaps","in","time","series","Args",":","gap_value",":","value",",","which","mask","gap","elements","in","array","pipeline",":","TsForecastingPipeline","object","for","filling","in","the","gaps"]
docstr: The method makes a prediction as a sequence of elements based on a
  training sample. There are two main parts: fit model and predict.
  
  Args:
      pipeline: pipeline for forecasting
      timeseries_train: part of the time series for training the model
      len_gap: number of elements in the gap
  
  Returns:
      array without gaps
docstr_tok: ["The","method","makes","a","prediction","as","a","sequence","of","elements","based","on","a","training","sample",".","There","are","two","main","parts",":","fit","model","and","predict",".","Args",":","pipeline",":","pipeline","for","forecasting","timeseries_train",":","part","of","the","time","series","for","training","the","model","len_gap",":","number","of","elements","in","the","gap","Returns",":","array","without","gaps"]
code: def __pipeline_fit_predict(
      self, pipeline, timeseries_train: np.array, len_gap: int
  ):
      """The method makes a prediction as a sequence of elements based on a
      training sample. There are two main parts: fit model and predict.
  
      Args:
          pipeline: pipeline for forecasting
          timeseries_train: part of the time series for training the model
          len_gap: number of elements in the gap
  
      Returns:
          array without gaps
      """
      pipeline_for_forecast = deepcopy(pipeline)
  
      task = Task(
          TaskTypesEnum.ts_forecasting,
          TsForecastingParams(forecast_length=len_gap),
      )
  
      input_data = InputData(
          idx=np.arange(0, len(timeseries_train)),
          features=timeseries_train,
          target=timeseries_train,
          task=task,
          data_type=DataTypesEnum.ts,
      )
  
      forecast_length = input_data.task.task_params.forecast_length
      data_length = input_data.features.shape[0]
      for node in pipeline_for_forecast.nodes:
          if node.name == "lagged":
              if (
                  node.parameters["window_size"] + forecast_length
                  >= data_length
              ):
                  node.parameters = {
                      "window_size": max(
                          data_length - forecast_length - 10, 2
                      )
                  }
  
      # Making predictions for the missing part in the time series
      pipeline_for_forecast.fit_from_scratch(input_data)
  
      # "Test data" for making prediction for a specific length
      start_forecast = len(timeseries_train)
      end_forecast = start_forecast + len_gap
      idx_test = np.arange(start_forecast, end_forecast)
      test_data = InputData(
          idx=idx_test,
          features=timeseries_train,
          target=None,
          task=task,
          data_type=DataTypesEnum.ts,
      )
  
      predicted_values = pipeline_for_forecast.predict(test_data)
      predicted_values = np.ravel(np.array(predicted_values.predict))
      return predicted_values
  
imports: from copy import deepcopy
  from typing import List, Union
  import numpy
  from golem.core.log import default_log
  from scipy import interpolate
  from fedot.core.data.data import InputData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
label_desc: Use image node_id 6 for calling the ModelGapFiller obj's underlying member method code with example usage: obj.__pipeline_fit_predict(pipeline, timeseries_train, len_gap) and returns: predicted_values