code: def signal():
      np.random.seed(0)
  
      # create normal time series and one with perturbations
      t = np.linspace(0, 0.5, 1000)
      X = np.sin(40 * 2 * np.pi * t) + 0.5 * np.sin(90 * 2 * np.pi * t)
  
      idx_pert = np.random.choice(
          np.arange(1000), size=10, replace=False
      )  # ensure we perturb exactly 10 points
      X_pert = X.copy()
      X_pert[idx_pert] = 10
      return {"t": t, "X": X, "X_pert": X_pert}
  
imports: import pytest
  import numpy
  from alibi_detect.od import SpectralResidual
  from alibi_detect.version import __version__
label_desc: Use image node_id 1 for calling a global function with example usage: signal() and returns: dict