code: def test_get_data():
      """Test the get_data method for Evoked."""
      evoked = read_evokeds(fname, 0)
      d1 = evoked.get_data()
      d2 = evoked.data
      assert_array_equal(d1, d2)
  
      eeg_idxs = np.array(
          [i == "eeg" for i in evoked.get_channel_types()]
      )
      assert_array_equal(
          evoked.data[eeg_idxs], evoked.get_data(picks="eeg")
      )
  
      # Get a specific time window using tmin and tmax
      d3 = evoked.get_data(tmin=0)
      assert np.all(
          d3.shape[1]
          == evoked.data.shape[1] - np.nonzero(evoked.times == 0)[0]
      )
  
      assert evoked.get_data(tmin=0, tmax=0).size == 0
  
      with pytest.raises(TypeError, match="tmin .* float, None"):
          evoked.get_data(tmin=[1], tmax=1)
  
      with pytest.raises(TypeError, match="tmax .* float, None"):
          evoked.get_data(tmin=1, tmax=np.ones(5))
  
      # Test units
      # more tests in mne/io/tests/test_raw.py::test_get_data_units
      # EEG is already in V, so no conversion should take place
      d1 = evoked.get_data(picks="eeg", units=None)
      d2 = evoked.get_data(picks="eeg", units="V")
      assert_array_equal(d1, d2)
  
      # Convert to µV
      d3 = evoked.get_data(picks="eeg", units="µV")
      assert_array_equal(d1 * 1e6, d3)
  
imports: import pickle
  from copy import deepcopy
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import fftpack
  from mne import Epochs, EpochsArray, combine_evoked, create_info, equalize_channels, pick_types, read_events, read_evokeds, write_evokeds
  from mne._fiff.constants import FIFF
  from mne.evoked import Evoked, EvokedArray, _get_peak
  from mne.io import read_raw_fif
  from mne.utils import grand_average
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_data() without return types