code: def test_before_only(self):
      previous = self.auto_expand.getprevword
      expand = self.auto_expand.expand_word_event
      equal = self.assertEqual
  
      self.text.insert("insert", "ab ac bx ad ab a")
      equal(self.auto_expand.getwords(), ["ab", "ad", "ac", "a"])
      expand("event")
      equal(previous(), "ab")
      expand("event")
      equal(previous(), "ad")
      expand("event")
      equal(previous(), "ac")
      expand("event")
      equal(previous(), "a")
  
file_path: cpython/Lib/idlelib/idle_test/test_autoexpand.py
imports: from idlelib.autoexpand import AutoExpand
  import unittest
  from test.support import requires
  from tkinter import Text, Tk
label_desc: Use image node_id 5 for calling the AutoExpandTest obj's underlying member method code with example usage: obj.test_before_only() without return types