code: def test_shared_composition():
      shared = (
          analysis.RegexTokenizer(r"\S+") | analysis.LowercaseFilter()
      )
  
      ana1 = shared | analysis.NgramFilter(3)
      ana2 = shared | analysis.DoubleMetaphoneFilter()
  
      assert [t.text for t in ana1(u("hello"))] == ["hel", "ell", "llo"]
      assert [t.text for t in ana2(u("hello"))] == ["HL"]
  
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 8 for calling a global function with example usage: test_shared_composition() without return types