code: def test_warn_ignore():
      # Check warning ignore context manager
      n_warns = len(warnings.filters)
      with suppress_warnings():
          warnings.warn("Here is a warning, you will not see it")
          warnings.warn("Nor this one", DeprecationWarning)
      with suppress_warnings() as w:  # w not used
          warnings.warn("Here is a warning, you will not see it")
          warnings.warn("Nor this one", DeprecationWarning)
      assert n_warns == len(warnings.filters)
      # Check other errors are propagated
  
      def f():
          with suppress_warnings():
              raise ValueError("An error")
  
      with pytest.raises(ValueError):
          f()
  
file_path: nibabel/nibabel/tests/test_testing.py
imports: import os
  import sys
  import warnings
  import numpy
  import pytest
  from ..casting import sctypes
  from ..testing import assert_allclose_safely, assert_re_in, clear_and_catch_warnings, data_path, error_warnings, get_fresh_mod, get_test_data, suppress_warnings
label_desc: Use image node_id 6 for calling a global function with example usage: test_warn_ignore() without return types