code: def testWhiteNoise(self):
      from random import random
  
      # generate test signal
      signalSize = 10 * self.params["frameSize"]
      signal = array(
          [2 * (random() - 0.5) * i for i in ones(signalSize)]
      )
  
      # for white noise test set sine minimum duration to 50ms, and min threshold of -20dB
      self.params["minSineDur"] = 0.05
      self.params["magnitudeThreshold"] = -20
  
      # for white noise we reduce the precision to 30dB
      precisiondB = (
          -20.0
      )  # -20dB of allowed noise floor for whtie noise input
      precisionDigits = int(
          -numpy.round(precisiondB / 20.0) - 1
      )  # -1 due to the rounding digit comparison.
  
      outsignal, pool = analsynthSineSubtractionStreaming(
          self.params, signal
      )
  
      outsignal = outsignal[
          :signalSize
      ]  # cut to durations of input and output signal
  
      # compare without half-window bounds to avoid windowing effect
      halfwin = self.params["frameSize"] // 2
  
      # compare: input and output swhuold have similar energy
      self.assertAlmostEqualVectorFixedPrecision(
          outsignal[halfwin:-halfwin],
          signal[halfwin:-halfwin],
          precisionDigits,
      )
  
file_path: essentia/test/src/unittests/synthesis/test_sinesubtraction_streaming.py
imports: from essentia_test import *
  import math
  import essentia
  import essentia.streaming
  import essentia.standard
  import numpy
label_desc: Use image node_id 2 for calling the TestSineSubtraction obj's underlying member method code with example usage: obj.testWhiteNoise() without return types