code: def prepare_data(y, d, D, s):
      """Applies differencing and seasonal differencing to the data"""
      n_obs, batch_size = y.shape
      s1 = s if D else (1 if d else 0)
      s2 = 1 if d + D == 2 else 0
      y_diff = np.zeros((n_obs - d - s * D, batch_size), dtype=y.dtype)
      for i in range(batch_size):
          temp = y[s1:, i] - y[:-s1, i] if s1 else y[:, i]
          y_diff[:, i] = temp[s2:] - temp[:-s2] if s2 else temp[:]
      return y_diff
  
imports: from cuml.tsa import stationarity
  from statsmodels.tsa import stattools
  import warnings
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_data(y, d, D, s) and returns: y_diff