code: def test_xdawn_baselinecov(
      n_channels, baseline_cov, rndstate, get_labels
  ):
      n_classes, n_matrices, n_times = 2, 6, 100
      x = rndstate.randn(n_matrices, n_channels, n_times)
      labels = get_labels(n_matrices, n_classes)
      if baseline_cov:
          baseline_cov = np.identity(n_channels)
      else:
          baseline_cov = None
      xd = Xdawn(baseline_cov=baseline_cov)
      xd.fit(x, labels).transform(x)
      n_components = min(n_channels, xd.nfilter)
      assert xd.filters_.shape == (n_classes * n_components, n_channels)
  
imports: from conftest import get_metrics
  import pytest
  import numpy
  from numpy.testing import assert_array_equal
  from pyriemann.spatialfilters import Xdawn, CSP, SPoC, BilinearFilter, AJDC
label_desc: Use image node_id 7 for calling a global function with example usage: test_xdawn_baselinecov(n_channels, baseline_cov, rndstate, get_labels) without return types