code: def fit(self, X):
          
  
          training_signal = X
  
          self.window_design(self.window_length, self.beta)
  
          if self.method == 'std_dev':
              self.fit_freq_std_dev(training_signal)
          elif self.method == 'min_max':
              self.fit_freq_min_max(training_signal)
          else:
              raise ValueError('Unknown method: {}'.format(self.method))
docs: Defines a spectral mask based on training data
  
          Args:
              X: Training data