code: def test_coherences(coh, rndstate):
      """Test fit Coherences"""
      n_matrices, n_channels, n_times = 2, 5, 200
      x = rndstate.randn(n_matrices, n_channels, n_times)
  
      cov = Coherences(coh=coh)
      assert cov.get_params() == dict(
          window=128,
          overlap=0.75,
          fs=None,
          fmin=None,
          fmax=None,
          coh=coh,
      )
  
      if coh == "lagged":
          cov.set_params(**{"fs": 128, "fmin": 1, "fmax": 63})
          n_freqs = 63
      else:
          n_freqs = 65
  
      cov.fit(x)
      covmats = cov.fit_transform(x)
      assert covmats.shape == (
          n_matrices,
          n_channels,
          n_channels,
          n_freqs,
      )
      if coh in ["ordinary", "instantaneous"]:
          assert is_spsd(covmats.transpose(0, 3, 1, 2))
  
imports: import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_raises
  import pytest
  from pyriemann.estimation import Covariances, ERPCovariances, XdawnCovariances, CospCovariances, HankelCovariances, Coherences, Shrinkage, BlockCovariances, Kernels
  from pyriemann.utils.test import is_sym_pos_def, is_sym_pos_semi_def
label_desc: Use image node_id 15 for calling a global function with example usage: test_coherences(coh, rndstate) without return types