code: def test_init_EpochsTFR():
      """Test __init__ for EpochsTFR."""
      # Create fake data:
      data = np.zeros((3, 3, 3, 3))
      times = np.array([0.1, 0.2, 0.3])
      freqs = np.array([0.10, 0.20, 0.30])
      info = mne.create_info(
          ["MEG 001", "MEG 002", "MEG 003"],
          1000.0,
          ["mag", "mag", "mag"],
      )
      data_x = data[:, :, :, 0]
      with pytest.raises(ValueError, match="data should be 4d. Got 3"):
          tfr = EpochsTFR(info, data=data_x, times=times, freqs=freqs)
      data_x = data[:, :-1, :, :]
      with pytest.raises(
          ValueError, match="channels and data size don't"
      ):
          tfr = EpochsTFR(info, data=data_x, times=times, freqs=freqs)
      times_x = times[:-1]
      with pytest.raises(
          ValueError, match="times and data size don't match"
      ):
          tfr = EpochsTFR(info, data=data, times=times_x, freqs=freqs)
      freqs_x = freqs[:-1]
      with pytest.raises(
          ValueError, match="frequencies and data size don't"
      ):
          tfr = EpochsTFR(info, data=data, times=times_x, freqs=freqs_x)
          del tfr
  
imports: import datetime
  import re
  from itertools import product
  from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_equal
  from scipy.signal import morlet2
  import mne
  from mne import Epochs, EpochsArray, Info, Transform, create_info, pick_types, read_events
  from mne.io import read_raw_fif
  from mne.tests.test_epochs import assert_metadata_equal
  from mne.time_frequency import tfr_array_morlet, tfr_array_multitaper
  from mne.time_frequency.tfr import AverageTFR, EpochsTFR, _compute_tfr, _make_dpss, combine_tfr, cwt, fwhm, morlet, read_tfrs, tfr_morlet, tfr_multitaper, write_tfrs
  from mne.utils import catch_logging, grand_average
  from mne.viz.utils import _fake_click, _fake_keypress, _fake_scroll
label_desc: Use image node_id 9 for calling a global function with example usage: test_init_EpochsTFR() without return types