code: def test_get_colorbar_and_data_ranges_error():
      """Tests for expected errors in get_colorbar_and_data_ranges."""
      # incompatible vmin and vmax if symmetric_cbar is True
      with pytest.raises(
          ValueError, match="vmin must be equal to -vmax"
      ):
          get_colorbar_and_data_ranges(
              data_pos_neg,
              vmin=0,
              vmax=1.0,
              symmetric_cbar=True,
          )
  
file_path: nilearn/nilearn/plotting/tests/test_img_plotting/test_get_colorbar_and_data_ranges.py
imports: import numpy
  import pytest
  from nilearn.plotting.img_plotting import get_colorbar_and_data_ranges
label_desc: Use image node_id 5 for calling a global function with example usage: test_get_colorbar_and_data_ranges_error() without return types