code: def test_process_clim_plot(renderer_interactive, brain_gc):
      """Test functionality for determining control points with stc.plot."""
      pytest.importorskip("nibabel")
      sample_src = read_source_spaces(src_fname)
      kwargs = dict(
          subjects_dir=subjects_dir,
          smoothing_steps=1,
          time_viewer=False,
          show_traces=False,
      )
  
      vertices = [s["vertno"] for s in sample_src]
      n_time = 5
      n_verts = sum(len(v) for v in vertices)
      stc_data = np.random.RandomState(0).rand(n_verts * n_time)
      stc_data.shape = (n_verts, n_time)
      stc = SourceEstimate(stc_data, vertices, 1, 1, "sample")
  
      # Test for simple use cases
      brain = stc.plot(**kwargs)
      assert brain.data["center"] is None
      brain.close()
      brain = stc.plot(clim=dict(pos_lims=(10, 50, 90)), **kwargs)
      assert brain.data["center"] == 0.0
      brain.close()
      brain = stc.plot(colormap="hot", clim="auto", **kwargs)
      brain.close()
      brain = stc.plot(colormap="mne", clim="auto", **kwargs)
      brain.close()
      brain = stc.plot(
          clim=dict(kind="value", lims=(10, 50, 90)),
          figure=99,
          **kwargs,
      )
      brain.close()
      with pytest.raises(TypeError, match="must be a"):
          stc.plot(clim="auto", figure=[0], **kwargs)
  
      # Test for correct clim values
      with pytest.raises(ValueError, match="monotonically"):
          stc.plot(
              clim=dict(kind="value", pos_lims=[0, 1, 0]), **kwargs
          )
      with pytest.raises(ValueError, match=r".*must be \(3,\)"):
          stc.plot(
              colormap="mne",
              clim=dict(pos_lims=(5, 10, 15, 20)),
              **kwargs,
          )
      with pytest.raises(
          ValueError, match="'value', 'values', and 'percent'"
      ):
          stc.plot(
              clim=dict(pos_lims=(5, 10, 15), kind="foo"), **kwargs
          )
      with pytest.raises(ValueError, match='must be "auto" or dict'):
          stc.plot(colormap="mne", clim="foo", **kwargs)
      with pytest.raises(TypeError, match="must be an instance of"):
          plot_source_estimates("foo", clim="auto", **kwargs)
      with pytest.raises(ValueError, match="hemi"):
          stc.plot(hemi="foo", clim="auto", **kwargs)
      with pytest.raises(ValueError, match="Exactly one"):
          stc.plot(
              clim=dict(
                  lims=[0, 1, 2], pos_lims=[0, 1, 2], kind="value"
              ),
              **kwargs,
          )
  
      # Test handling of degenerate data: thresholded maps
      stc._data.fill(0.0)
      with pytest.warns(RuntimeWarning, match="All data were zero"):
          brain = plot_source_estimates(stc, **kwargs)
      brain.close()
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib.colors import Colormap
  from matplotlib.figure import Figure
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import MixedSourceEstimate, SourceEstimate, convert_forward_solution, make_field_map, make_sphere_model, pick_info, pick_types, read_dipole, read_evokeds, read_forward_solution, read_trans, setup_volume_source_space, use_coil_def
  from mne._fiff._digitization import write_dig
  from mne._fiff.constants import FIFF
  from mne.bem import read_bem_solution, read_bem_surfaces
  from mne.datasets import testing
  from mne.defaults import DEFAULTS
  from mne.io import read_info, read_raw_bti, read_raw_ctf, read_raw_kit, read_raw_nirx
  from mne.minimum_norm import apply_inverse
  from mne.source_estimate import _BaseVolSourceEstimate
  from mne.source_space import read_source_spaces
  from mne.transforms import Transform
  from mne.utils import _record_warnings, catch_logging
  from mne.viz import Brain, EvokedField, Figure3D, link_brains, mne_analyze_colormap, plot_alignment, plot_brain_colorbar, plot_head_positions, plot_source_estimates, plot_sparse_source_estimates, snapshot_brain_montage
  from mne.viz._3d import _get_map_ticks, _linearize_map, _process_clim
  from mne.viz.utils import _fake_click, _fake_keypress, _fake_scroll, _get_cmap
label_desc: Use image node_id 10 for calling a global function with example usage: test_process_clim_plot(renderer_interactive, brain_gc) without return types