code: def deviance_constraint(
      ts_train: np.array, prediction: np.array, constraint=2
  ):
      """ "Function to check whether a pipeline prediction oscillate to much comparing with train series.
  
      Args:
          ts_train: initial time series
          prediction: a forecast obtained by some mutation
          constraint: strength of oscillation restriction.
  
      Returns:
          True if prediction does not oscillate too much, otherwise False.
      """
      return ts_deviance(prediction) <= constraint * ts_deviance(
          ts_train
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: deviance_constraint(ts_train, prediction, constraint) and returns: unknown