input: Write a function to detect anomalies using 3 standard deviations from the mean.
  assert detect_anomalies([1, 2, 3, 4, 5, 100]) == [100]
  assert detect_anomalies([10, 12, 10, 11, 10, 50]) == [50]
  assert detect_anomalies([-10, -10, -11, -10, -100]) == [-100]
output: def detect_anomalies(data):
      import numpy as np
      mean = np.mean(data)
      std_dev = np.std(data)
      anomalies = [x for x in data if abs(x - mean) > 3 * std_dev]
      return anomalies