code: def test_csd_save(tmp_path):
      """Test saving and loading a CrossSpectralDensity."""
      pytest.importorskip("h5io")
      csd = _make_csd(add_proj=True)
      fname = op.join(str(tmp_path), "csd.h5")
      csd.save(fname)
      csd2 = read_csd(fname)
      assert_array_equal(csd._data, csd2._data)
      assert_array_equal(csd.frequencies, csd2.frequencies)
      assert csd.tmin == csd2.tmin
      assert csd.tmax == csd2.tmax
      assert csd.ch_names == csd2.ch_names
      assert csd._is_sum == csd2._is_sum
      assert isinstance(csd2.projs[0], Projection)
  
imports: import pickle
  from itertools import product
  from os import path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from pytest import raises
  import mne
  from mne.channels import equalize_channels
  from mne.proj import Projection
  from mne.time_frequency import CrossSpectralDensity, csd_array_fourier, csd_array_morlet, csd_array_multitaper, csd_fourier, csd_morlet, csd_multitaper, csd_tfr, pick_channels_csd, read_csd, tfr_morlet
  from mne.time_frequency.csd import _sym_mat_to_vector, _vector_to_sym_mat
  from mne.utils import sum_squared
label_desc: Use image node_id 8 for calling a global function with example usage: test_csd_save(tmp_path) without return types