code: def _make_codec(**kwargs):
      st = RamStorage()
      codec = default_codec(**kwargs)
      seg = codec.new_segment(st, "test")
      return st, codec, seg
  
imports: from __future__ import with_statement
  import random
  from array import array
  import pytest
  from whoosh import analysis, fields, formats, query
  from whoosh.compat import u, b, text_type
  from whoosh.compat import array_tobytes, xrange
  from whoosh.codec import default_codec
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage
label_desc: Use image node_id 1 for calling a global function with example usage: _make_codec() and returns: st,  codec,  seg