code: def __test_color_slope(jam_orig, jam_new, color):
      colored_noise_data = jam_new.sandbox.muda["_audio"]["y"]
      colored_noise_sr = jam_new.sandbox.muda["_audio"]["sr"]
  
      # Verify that the sampling rate hasn't changed
      assert jam_orig.sandbox.muda["_audio"]["sr"] == colored_noise_sr
      # estimate the power spectrum slope on log-log scale
      n_frames = len(colored_noise_data)
      y_power = np.absolute(np.fft.rfft(colored_noise_data)) ** 2
      freqs = np.fft.rfftfreq(n_frames, 1 / float(colored_noise_sr))
      x = np.log(freqs[1:])
      y = np.log(y_power[1:])
      # rounded off to the 3 digits after the decimal point
      estimated_slope = round(scipy.stats.linregress(x, y)[0], 3)
      if color == "white":
          expected_slope = -0.0
          isclose_(expected_slope, estimated_slope)
      elif color == "pink":
          expected_slope = -1.0
          isclose_(expected_slope, estimated_slope)
      elif color == "brownian":
          expected_slope = -2.0
          isclose_(expected_slope, estimated_slope)
      else:
          raise ValueError("Unknown noise color\n")
  
imports: from copy import deepcopy
  import re
  import six
  import numpy
  import soundfile
  import jams
  import librosa
  import muda
  import pytest
  import scipy
  from contextlib import contextmanager
label_desc: Use image node_id 32 for calling a global function with example usage: __test_color_slope(jam_orig, jam_new, color) without return types