code: def produce(self, X):
          
  
          signal = X
  
          window_length = len(self.window)
          anomalies = np.zeros(len(signal))
          window_weight = sum(self.window)
          for i in range(0, len(signal) - window_length - 1):
              rfft = np.fft.rfft(signal[i:i + window_length] * self.window)
              sig_freq = np.abs(rfft) / window_weight
              anomalies[i] = 0
              for m in range(0, int(window_length / 2) - 1):
                  if ((sig_freq[m] > self.mask_top[m]) or (sig_freq[m] < self.mask_bottom[m])):
                      anomalies[i] = 1
                      break
  
          return anomalies
docs: Detects anomalies in telemetry data based on its power spectral density
  
          Args:
              X: Telemetry data
  
          Returns:
              anomalies: Data vector consisting of the anomalies detected in the telemetry data