code: def test_text_match(gt, pred, raw, caseless, unidecode, unicase):
      metric = metrics.TextMatch()
      with pytest.raises(AssertionError):
          metric.summary()
  
      with pytest.raises(AssertionError):
          metric.update(["a", "b"], ["c"])
  
      metric.update(gt, pred)
      assert metric.summary() == dict(
          raw=raw,
          caseless=caseless,
          unidecode=unidecode,
          unicase=unicase,
      )
  
      metric.reset()
      assert (
          metric.raw
          == metric.caseless
          == metric.unidecode
          == metric.unicase
          == metric.total
          == 0
      )
  
file_path: doctr/tests/common/test_utils_metrics.py
imports: import numpy
  import pytest
  from doctr.utils import metrics
label_desc: Use image node_id 1 for calling a global function with example usage: test_text_match(gt, pred, raw, caseless, unidecode, unicase) without return types