code: def test_ajdc_fit(rndstate):
      n_subjects, n_conditions, n_channels, n_times = 5, 3, 8, 512
      X = rndstate.randn(n_subjects, n_conditions, n_channels, n_times)
      ajdc = AJDC(dim_red={"n_components": n_channels - 1}).fit(X)
      assert ajdc.forward_filters_.shape == (
          ajdc.n_sources_,
          n_channels,
      )
      assert ajdc.backward_filters_.shape == (
          n_channels,
          ajdc.n_sources_,
      )
      with pytest.warns(UserWarning):  # dim_red is None
          AJDC().fit(X)
  
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 13 for calling a global function with example usage: test_ajdc_fit(rndstate) without return types