code: def test_order():
      """Test that order does not matter."""
      fwd = read_forward_solution(fwd_fname)
      fwd = convert_forward_solution(
          fwd, force_fixed=True, use_cps=False
      )
      evoked = read_evokeds(ave_fname)[0].pick(["meg", "eeg"])
      assert "meg" in evoked
      assert "eeg" in evoked
      meg_picks = pick_types(evoked.info, meg=True)
      eeg_picks = pick_types(evoked.info, eeg=True)
      # MEG then EEG
      assert (eeg_picks > meg_picks.max()).all()
      times = np.arange(10) / 1000.0
      stc = simulate_sparse_stc(
          fwd["src"], 1, times=times, random_state=0
      )
      evoked_sim = simulate_evoked(fwd, stc, evoked.info, nave=np.inf)
      reorder = np.concatenate([eeg_picks, meg_picks])
      evoked.reorder_channels(
          [evoked.ch_names[pick] for pick in reorder]
      )
      evoked_sim_2 = simulate_evoked(fwd, stc, evoked.info, nave=np.inf)
      want_data = evoked_sim.data[reorder]
      assert_allclose(evoked_sim_2.data, want_data)
  
file_path: mne-python/mne/simulation/tests/test_evoked.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import EpochsArray, compute_covariance, compute_raw_covariance, convert_forward_solution, pick_channels_cov, pick_types, pick_types_forward, read_cov, read_evokeds, read_forward_solution
  from mne.cov import regularize, whiten_evoked
  from mne.datasets import testing
  from mne.io import read_raw_fif
  from mne.simulation import add_noise, simulate_evoked, simulate_sparse_stc
  from mne.utils import catch_logging
label_desc: Use image node_id 4 for calling a global function with example usage: test_order() without return types