code: def test_tfce_thresholds(numba_conditional):
      """Test TFCE thresholds."""
      rng = np.random.RandomState(0)
      data = rng.randn(7, 10, 1) - 0.5
  
      # if tail==-1, step must also be negative
      with pytest.raises(
          ValueError, match="must be < 0 for tail == -1"
      ):
          permutation_cluster_1samp_test(
              data,
              tail=-1,
              out_type="mask",
              threshold=dict(start=0, step=0.1),
          )
      # this works (smoke test)
      permutation_cluster_1samp_test(
          data,
          tail=-1,
          out_type="mask",
          threshold=dict(start=0, step=-0.1),
      )
  
      # thresholds must be monotonically increasing
      with pytest.raises(
          ValueError, match="must be monotonically increasing"
      ):
          permutation_cluster_1samp_test(
              data,
              tail=1,
              out_type="mask",
              threshold=dict(start=1, step=-0.5),
          )
  
      # Should work with 2D data too
      permutation_cluster_1samp_test(
          X=data[..., 0], threshold=dict(start=0, step=0.2)
      )
  
imports: import os
  from functools import partial
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import linalg, sparse, stats
  from mne import MixedSourceEstimate, SourceEstimate, SourceSpaces, VolSourceEstimate
  from mne.stats import combine_adjacency, ttest_ind_no_p
  from mne.stats.cluster_level import f_oneway, permutation_cluster_1samp_test, permutation_cluster_test, spatio_temporal_cluster_1samp_test, spatio_temporal_cluster_test, summarize_clusters_stc, ttest_1samp_no_p
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 15 for calling a global function with example usage: test_tfce_thresholds(numba_conditional) without return types