code: def series_has_gaps_check(gapfilling_method):
      """Check is time series has gaps or not. Return source array, if not"""
  
      def wrapper(self, input_data, *args, **kwargs):
          input_data = replace_nan_with_label(
              input_data, label=self.gap_value
          )
          gap_ids = np.ravel(np.argwhere(input_data == self.gap_value))
          if len(gap_ids) == 0:
              self.log.info(
                  f"Array does not contain values marked as gaps {self.gap_value}"
              )
              return input_data
          else:
              self.log.debug(
                  f"Array contain values marked as gaps {self.gap_value}. Start gap-filling"
              )
              filled_array = gapfilling_method(
                  self, input_data, *args, **kwargs
              )
              return filled_array
  
      return wrapper
  
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 1 for calling a global function with example usage: series_has_gaps_check(gapfilling_method) and returns: wrapper, input_data, filled_array