code: def replace_nan_with_label(
      time_series: np.ndarray, label: Union[int, float]
  ):
      """Replace np.nan in the array with desired label"""
      return np.nan_to_num(time_series, nan=label)
  
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 2 for calling a global function with example usage: replace_nan_with_label(time_series, label) and returns: np