code: def test_plot_stat_map_threshold(data, affine_eye):
      """Tests plot_stat_map with threshold (see #510)."""
      plot_stat_map(
          Nifti1Image(data, affine_eye), threshold=1000, colorbar=True
      )
      plt.close()
  
imports: import matplotlib.pyplot
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from nilearn.conftest import _rng
  from nilearn.datasets import load_mni152_template
  from nilearn.image import get_data
  from nilearn.image.resampling import coord_transform
  from nilearn.plotting import plot_stat_map
  from nilearn.plotting.find_cuts import find_cut_slices
label_desc: Use image node_id 5 for calling a global function with example usage: test_plot_stat_map_threshold(data, affine_eye) without return types