code: def emit(self, record):
      if self.pattern in record.msg:
          self.history[record.msg] += 1
  
file_path: Fiona/tests/test_transactions.py
imports: from collections import defaultdict
  import logging
  import os
  import pytest
  from random import uniform, randint
  import fiona
  from fiona.model import Feature
  import fiona.ogrext
  from tests.conftest import requires_gdal2
label_desc: Use image node_id 2 for calling the DebugHandler obj's underlying member method code with example usage: obj.emit(record) without return types