docs: def get_anomalies(smoothed_errors, y_true, z, window, all_anomalies, error_buffer):
      """
          Helper method to get anomalies.
      """
  
      mu = np.mean(smoothed_errors)
      sigma = np.std(smoothed_errors)
  
      epsilon = mu + (z * sigma)
  
      # compare to epsilon
      errors_seq, anomaly_indices, max_error_below_e = group_consecutive_anomalies(
          smoothed_errors,
          epsilon,
          y_true,
          error_buffer,
          window,
          all_anomalies
      )
  
      if len(errors_seq) > 0:
          anomaly_indices = prune_anomalies(
              errors_seq,
              smoothed_errors,
              max_error_below_e,
              anomaly_indices
          )
  
      return anomaly_indices