code: def test_2957_2():
      """Redacted text must not change positions of remaining text."""
      doc = fitz.open(
          os.path.join(scriptdir, "resources", "test_2957_2.pdf")
      )
      page = doc[0]
      words0 = page.get_text("words")  # all words before redacting
      page.apply_redactions()  # remove/redact the word "longer"
      words1 = page.get_text("words")  # extract words again
      assert len(words1) == len(words0) - 1  # must be one word less
      assert (
          words0[3][4] == "longer"
      )  # just confirm test file is correc one
      del words0[3]  # remove the redacted word from first list
      for i in range(len(words1)):  # compare words
          w1 = words1[i]  # word after redaction
          bbox1 = fitz.Rect(w1[:4]).irect  # its IRect coordinates
          w0 = words0[i]  # word before redaction
          bbox0 = fitz.Rect(w0[:4]).irect  # its IRect coordinates
          assert bbox0 == bbox1
  
imports: import io
  import os
  import fitz
  import pickle
label_desc: Use image node_id 48 for calling a global function with example usage: test_2957_2() without return types