code: def test_porter2():
      from whoosh.lang.porter2 import stem
  
      plurals = [
          "caresses",
          "flies",
          "dies",
          "mules",
          "denied",
          "died",
          "agreed",
          "owned",
          "humbled",
          "sized",
          "meeting",
          "stating",
          "siezing",
          "itemization",
          "sensational",
          "traditional",
          "reference",
          "colonizer",
          "plotted",
      ]
      singles = [stem(w) for w in plurals]
  
      assert singles == [
          "caress",
          "fli",
          "die",
          "mule",
          "deni",
          "die",
          "agre",
          "own",
          "humbl",
          "size",
          "meet",
          "state",
          "siez",
          "item",
          "sensat",
          "tradit",
          "refer",
          "colon",
          "plot",
      ]
      assert stem("bill's") == "bill"
      assert stem("y's") == "y"
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, qparser
  from whoosh.compat import b, u, unichr
  from whoosh.compat import dumps
  from whoosh.filedb.filestore import RamStorage
label_desc: Use image node_id 21 for calling a global function with example usage: test_porter2() without return types