code: def test_all_modules_error(func):
      with pytest.raises(
          ValueError,
          match=(
              "`modules_to_ignore` and "
              "`modules_to_consider` cannot "
              "be both specified."
          ),
      ):
          func(modules_to_ignore=["foo"], modules_to_consider=["bar"])
  
imports: import numpy
  import pytest
  from nilearn._utils import all_classes, all_functions, all_modules
label_desc: Use image node_id 1 for calling a global function with example usage: test_all_modules_error(func) without return types