class_docstr: Base class used for filling in the gaps in time series with simple methods.
  Methods from the SimpleGapFiller class can be used for comparison with more
  complex models in class ModelGapFiller
  
  Args:
      gap_value: value, which identify gap elements in array
class_docstr_tok: ["Base","class","used","for","filling","in","the","gaps","in","time","series","with","simple","methods",".","Methods","from","the","SimpleGapFiller","class","can","be","used","for","comparison","with","more","complex","models","in","class","ModelGapFiller","Args",":","gap_value",":","value",",","which","identify","gap","elements","in","array"]
docstr: Eliminate gaps, which place first or last index in time series 
docstr_tok: ["Eliminate","gaps",",","which","place","first","or","last","index","in","time","series"]
code: def _fill_first_and_last_gaps(
      self, input_data: np.array, output_data: np.array
  ):
      """Eliminate gaps, which place first or last index in time series"""
      non_nan_ids = np.ravel(np.argwhere(output_data != self.gap_value))
      non_nan = output_data[non_nan_ids]
      if np.isclose(input_data[0], self.gap_value):
          # First element is a gap - replace with first known value
          self.log.info(
              "First element in the array were replaced by first known value"
          )
          output_data[0] = non_nan[0]
      if np.isclose(input_data[-1], self.gap_value):
          # Last element is a gap - last known value
          self.log.info(
              "Last element in the array were replaced by last known value"
          )
          output_data[-1] = non_nan[-1]
  
      return output_data
  
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 SimpleGapFiller obj's underlying member method code with example usage: obj._fill_first_and_last_gaps(input_data, output_data) and returns: output_data