code: def test_get_data_tmin_tmax():
      """Test tmin and tmax parameters of get_data method."""
      fname = Path(__file__).parent / "data" / "test_raw.fif"
      raw = read_raw_fif(fname)
  
      # tmin and tmax just use time_as_index under the hood
      tmin, tmax = (1, 9)
      d1 = raw.get_data()
      d2 = raw.get_data(tmin=tmin, tmax=tmax)
  
      idxs = raw.time_as_index([tmin, tmax])
      assert_allclose(d1[:, idxs[0] : idxs[1]], d2)
  
      # specifying a too low tmin truncates to idx 0
      d3 = raw.get_data(tmin=-5)
      assert_allclose(d3, d1)
  
      # specifying a too high tmax truncates to idx n_times
      d4 = raw.get_data(tmax=1e6)
      assert_allclose(d4, d1)
  
      # when start/stop are passed, tmin/tmax are ignored
      d5 = raw.get_data(start=1, stop=2, tmin=tmin, tmax=tmax)
      assert d5.shape[1] == 1
  
      # validate inputs are properly raised
      with pytest.raises(TypeError, match="start must be .* int"):
          raw.get_data(start=None)
  
      with pytest.raises(TypeError, match="stop must be .* int"):
          raw.get_data(stop=2.3)
  
      with pytest.raises(TypeError, match="tmin must be .* float"):
          raw.get_data(tmin=[1, 2])
  
      with pytest.raises(TypeError, match="tmax must be .* float"):
          raw.get_data(tmax=[1, 2])
  
imports: import math
  import os
  import re
  from contextlib import redirect_stdout
  from io import StringIO
  from os import path
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  import mne
  from mne import Annotations, concatenate_raws, create_info, pick_types
  from mne._fiff._digitization import DigPoint, _dig_kind_dict
  from mne._fiff.constants import FIFF
  from mne._fiff.meas_info import Info, _get_valid_units, _writing_info_hdf5
  from mne._fiff.pick import _ELECTRODE_CH_TYPES, _FNIRS_CH_TYPES_SPLIT
  from mne._fiff.proj import Projection
  from mne._fiff.utils import _mult_cal_one
  from mne.fixes import _numpy_h5py_dep
  from mne.io import BaseRaw, RawArray, read_raw_fif
  from mne.io.base import _get_scaling
  from mne.transforms import Transform
  from mne.utils import _import_h5io_funcs, _raw_annot, _stamp_to_dt, _TempDir, catch_logging, check_version, object_diff
label_desc: Use image node_id 20 for calling a global function with example usage: test_get_data_tmin_tmax() without return types