code: def test_sample_condition_1():
      """Test that the experimental condition is correctly sampled."""
      condition = ([1, 20, 36.5], [0, 0, 0], [1, 1, 1])
      frame_times = np.linspace(0, 49, 50)
  
      reg, _ = _sample_condition(
          condition, frame_times, oversampling=1, min_onset=0
      )
  
      assert reg.sum() == 3
      assert reg[1] == 1
      assert reg[20] == 1
      assert reg[37] == 1
  
      reg, _ = _sample_condition(condition, frame_times, oversampling=1)
  
      assert reg.sum() == 3
      assert reg[25] == 1
      assert reg[44] == 1
      assert reg[61] == 1
  
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from nilearn.glm.first_level.hemodynamic_models import _calculate_tr, _hrf_kernel, _regressor_names, _resample_regressor, _sample_condition, compute_regressor, glover_dispersion_derivative, glover_hrf, glover_time_derivative, orthogonalize, spm_dispersion_derivative, spm_hrf, spm_time_derivative
label_desc: Use image node_id 8 for calling a global function with example usage: test_sample_condition_1() without return types