code: def test_span_before():
      ix = get_index()
      with ix.searcher() as s:
          bq = spans.SpanBefore(
              Term("text", "alfa"), Term("text", "charlie")
          )
          m = bq.matcher(s)
          while m.is_active():
              orig = list(s.stored_fields(m.id())["text"])
              assert "alfa" in orig
              assert "charlie" in orig
              assert orig.index("alfa") < orig.index("charlie")
              m.next()
  
imports: from __future__ import with_statement
  from whoosh import analysis, fields, formats
  from whoosh.compat import u, xrange, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.query import spans
  from whoosh.query import And, Or, Term, Phrase
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 13 for calling a global function with example usage: test_span_before() without return types