code: def test_extend_empty():
      schema = fields.Schema(id=fields.STORED, words=fields.KEYWORD)
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      w.add_document(id=1, words=u("alfa bravo charlie"))
      w.add_document(id=2, words=u("bravo charlie delta"))
      w.add_document(id=3, words=u("charlie delta echo"))
      w.add_document(id=4, words=u("delta echo foxtrot"))
      w.add_document(id=5, words=u("echo foxtrot golf"))
      w.commit()
  
      with ix.searcher() as s:
          # Get an empty results object
          r1 = s.search(query.Term("words", u("hotel")))
          # Copy it
          r1c = r1.copy()
          # Get a non-empty results object
          r2 = s.search(query.Term("words", u("delta")))
          # Copy it
          r2c = r2.copy()
          # Extend r1 with r2
          r1c.extend(r2c)
          assert [hit["id"] for hit in r1c] == [2, 3, 4]
          assert r1c.scored_length() == 3
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, formats, highlight, qparser, query
  from whoosh.codec.whoosh3 import W3Codec
  from whoosh.compat import u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage, TempIndex
label_desc: Use image node_id 7 for calling a global function with example usage: test_extend_empty() without return types