code: def test_calculate_tfce(two_sided_test, dh, true_max_tfce):
      """Test calculate_tfce."""
      test_arr4d = np.zeros((10, 10, 10, 1))
      bin_struct = generate_binary_structure(3, 1)
  
      # 10-voxel positive cluster, high intensity
      test_arr4d[:2, :2, :2, 0] = 10
      test_arr4d[0, 2, 0, 0] = 10
      test_arr4d[2, 0, 0, 0] = 10
  
      # 10-voxel negative cluster, higher intensity
      test_arr4d[3:5, 3:5, 3:5, 0] = -11
      test_arr4d[3, 5, 3, 0] = -11
      test_arr4d[5, 3, 3, 0] = -11
  
      test_tfce_arr4d = _utils.calculate_tfce(
          test_arr4d,
          bin_struct=bin_struct,
          E=1,
          H=1,
          dh=dh,
          two_sided_test=two_sided_test,
      )
  
      assert test_tfce_arr4d.shape == test_arr4d.shape
      assert np.max(np.abs(test_tfce_arr4d)) == true_max_tfce
  
imports: import math
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from scipy.ndimage import generate_binary_structure
  from nilearn.mass_univariate import _utils
  from nilearn.mass_univariate.tests._testing import get_tvalue_with_alternative_library
label_desc: Use image node_id 3 for calling a global function with example usage: test_calculate_tfce(two_sided_test, dh, true_max_tfce) without return types