code: def test_step4():
      word_str_ser_ls = [
          "revival",
          "allowance",
          "inference",
          "airliner",
          "gyroscopic",
          "adjustable",
          "defensible",
          "irritant",
          "replacement",
          "adjustment",
          "dependent",
          "adoption",
          "homologou",
          "communism",
          "activate",
          "angulariti",
          "homologous",
          "effective",
          "bowdlerize",
      ]
  
      expect = [
          "reviv",
          "allow",
          "infer",
          "airlin",
          "gyroscop",
          "adjust",
          "defens",
          "irrit",
          "replac",
          "adjust",
          "depend",
          "adopt",
          "homolog",
          "commun",
          "activ",
          "angular",
          "homolog",
          "effect",
          "bowdler",
      ]
  
      word_str_ser = cudf.Series(word_str_ser_ls)
      st = PorterStemmer()
      got = st._step4(word_str_ser)
      assert list(got.to_pandas().values) == expect
  
      # mask test
      expect = expect[:-2] + ["effective", "bowdlerize"]
      mask = cudf.Series([True] * (len(expect) - 2) + [False] * 2)
      got = st._step4(word_str_ser, mask)
      assert list(got.to_pandas().values) == expect
  
file_path: cuml/python/cuml/tests/stemmer_tests/test_steps.py
imports: from cuml.preprocessing.text.stem.porter_stemmer import PorterStemmer
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 6 for calling a global function with example usage: test_step4() without return types