code: def test_spectrum_kwarg_triaging(raw):
      """Test kwarg triaging in legacy plot_psd() method."""
      import matplotlib.pyplot as plt
  
      regex = r"legacy plot_psd\(\) method.*unexpected keyword.*'axes'.*Try rewriting"
      _, axes = plt.subplots(1, 2)
      # `axes` is the new param name: technically only valid for Spectrum.plot()
      with pytest.warns(RuntimeWarning, match=regex):
          raw.plot_psd(axes=axes)
      # `ax` is the correct legacy param name
      with pytest.warns(FutureWarning, match="amplitude='auto'"):
          raw.plot_psd(ax=axes)
  
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 14 for calling a global function with example usage: test_spectrum_kwarg_triaging(raw) without return types