code: def _n_dims_from_triu(n):
      """Compute matrix dims from number of elements in the upper triangle.
  
      Parameters
      ----------
      n : int
          Number of elements in the upper triangle of the symmetric matrix.
  
      Returns
      -------
      dim : int
          The dimensions of the symmetric matrix.
      """
      return int(np.ceil(np.sqrt(n * 2))) - 1
  
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 2 for calling a global function with example usage: _n_dims_from_triu(n) and returns: unknown