code: def read_csd(fname):
      """Read a CrossSpectralDensity object from an HDF5 file.
  
      Parameters
      ----------
      fname : path-like
          The name of the file to read the CSD from. The extension ``'.h5'`` will
          be appended if the given filename doesn't have it already.
  
      Returns
      -------
      csd : instance of CrossSpectralDensity
          The CSD that was stored in the file.
  
      See Also
      --------
      CrossSpectralDensity.save : For saving CSD objects.
      """
      read_hdf5, _ = _import_h5io_funcs()
      if not fname.endswith(".h5"):
          fname += ".h5"
  
      csd_dict = read_hdf5(fname, title="conpy")
  
      if csd_dict["projs"] is not None:
          # Avoid circular import
          from ..proj import Projection
  
          csd_dict["projs"] = [
              Projection(**proj) for proj in csd_dict["projs"]
          ]
  
      return CrossSpectralDensity(**csd_dict)
  
imports: import copy
  import numbers
  import numpy
  from scipy.fft import rfftfreq
  from .._fiff.pick import _picks_to_idx, pick_channels
  from ..parallel import parallel_func
  from ..time_frequency.multitaper import _compute_mt_params, _csd_from_mt, _mt_spectra, _psd_from_mt_adaptive
  from ..utils import ProgressBar, _check_fname, _import_h5io_funcs, _validate_type, copy_function_doc_to_method_doc, logger, verbose, warn
  from ..viz.misc import plot_csd
  from .tfr import EpochsTFR, _cwt_array, _get_nfft, morlet
label_desc: Use image node_id 5 for calling a global function with example usage: read_csd(fname) and returns: CrossSpectralDensity