code: def deterministic_toy_data(classes=("class_a", "class_b")):
      """Generate a small deterministic toy data set.
  
      Four independent sources are modulated by the target class and mixed
      into signal space.
      """
      sources_a = (
          np.array(
              [
                  [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
                  [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1],
                  [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
                  [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],
              ],
              dtype=float,
          )
          * 2
          - 1
      )
  
      sources_b = (
          np.array(
              [
                  [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
                  [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1],
                  [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
                  [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],
              ],
              dtype=float,
          )
          * 2
          - 1
      )
  
      sources_a[0, :] *= 1
      sources_a[1, :] *= 2
  
      sources_b[2, :] *= 3
      sources_b[3, :] *= 4
  
      mixing = np.array(
          [
              [1.0, 0.8, 0.6, 0.4],
              [0.8, 1.0, 0.8, 0.6],
              [0.6, 0.8, 1.0, 0.8],
              [0.4, 0.6, 0.8, 1.0],
          ]
      )
  
      x_class_a = mixing @ sources_a
      x_class_b = mixing @ sources_b
  
      x = np.stack([x_class_a, x_class_b])
      y = np.array(classes)
  
      return x, y
  
file_path: mne-python/mne/decoding/tests/test_csp.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import Epochs, io, pick_types, read_events
  from mne.decoding.csp import CSP, SPoC, _ajd_pham
label_desc: Use image node_id 2 for calling a global function with example usage: deterministic_toy_data(classes) and returns: x,  y