code: def test_spectrum_params(
      method,
      fmin,
      fmax,
      tmin,
      tmax,
      picks,
      proj,
      n_fft,
      n_overlap,
      n_per_seg,
      average,
      window,
      bandwidth,
      adaptive,
      low_bias,
      normalization,
      raw,
  ):
      """Test valid parameter combinations in the .compute_psd() method."""
      kwargs = dict(
          method=method,
          fmin=fmin,
          fmax=fmax,
          tmin=tmin,
          tmax=tmax,
          picks=picks,
          proj=proj,
      )
      if method == "welch":
          kwargs.update(
              n_fft=n_fft,
              n_overlap=n_overlap,
              n_per_seg=n_per_seg,
              average=average,
              window=window,
          )
      else:
          kwargs.update(
              bandwidth=bandwidth,
              adaptive=adaptive,
              low_bias=low_bias,
              normalization=normalization,
          )
      raw.compute_psd(**kwargs)
  
imports: from functools import partial
  import numpy
  import pytest
  from matplotlib.colors import same_color
  from numpy.testing import assert_array_equal
  from mne import Annotations
  from mne.time_frequency import read_spectrum
  from mne.time_frequency.spectrum import EpochsSpectrumArray, SpectrumArray
label_desc: Use image node_id 2 for calling a global function with example usage: test_spectrum_params(method, fmin, fmax, tmin, tmax, picks, proj, n_fft, n_overlap, n_per_seg, average, window, bandwidth, adaptive, low_bias, normalization, raw) without return types