code: def test_sample_condition_2():
      """Test the experimental condition sampling -- onset = 0"""
      condition = ([0, 20, 36.5], [2, 2, 2], [1, 1, 1])
      frametimes = np.linspace(0, 49, 50)
      reg, rf = _sample_condition(
          condition, frametimes, oversampling=1, min_onset=-10
      )
      assert reg.sum() == 6
      assert reg[10] == 1
      assert reg[48] == 1
      assert reg[31] == 1
  
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..hemodynamic_models import _hrf_kernel, _orthogonalize, _regressor_names, _resample_regressor, _sample_condition, compute_regressor, glover_hrf, glover_time_derivative, spm_dispersion_derivative, spm_hrf, spm_time_derivative
label_desc: Use image node_id 10 for calling a global function with example usage: test_sample_condition_2() without return types