code: def fade(array: np.ndarray, fade_size: int) -> np.ndarray:
      array = np.copy(array)
      fade_in = np.linspace(0, 1, fade_size)
      fade_out = fade_in[::-1]
      array[:fade_size].T[:] *= fade_in
      array[size(array) - fade_size :].T[:] *= fade_out
      return array
  
imports: import numpy
  import statsmodels.api
label_desc: Use image node_id 22 for calling a global function with example usage: fade(array, fade_size) and returns: array