code: def test_filtering(caplog):
      """Test that ordinary log messages pass"""
      logger = logging.getLogger()
      with LogFiltering(logger, FieldSkipLogFilter()):
          logger.warning("Attention!")
          logger.warning("Skipping field 1")
          logger.warning("Skipping field 2")
          logger.warning("Danger!")
          logger.warning("Skipping field 1")
  
      assert len(caplog.records) == 4
      assert caplog.records[0].getMessage() == "Attention!"
      assert caplog.records[1].getMessage() == "Skipping field 1"
      assert caplog.records[2].getMessage() == "Skipping field 2"
      assert caplog.records[3].getMessage() == "Danger!"
  
file_path: Fiona/tests/test_logutils.py
imports: import logging
  import os
  import fiona
  from fiona.logutils import LogFiltering, FieldSkipLogFilter
label_desc: Use image node_id 1 for calling a global function with example usage: test_filtering(caplog) without return types